diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 597f7b5..d8883e6 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -45,3 +45,13 @@ jobs: - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + homebrew: + uses: janw/workflows/.github/workflows/poetry-homebrew-formula.yaml@main + needs: build + with: + formula-name: podcast-archiver + secrets: + personal-access-token: ${{ secrets.BOT_PERSONAL_ACCESS_TOKEN }} + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} diff --git a/brew/template.rb.j2 b/brew/template.rb.j2 new file mode 100644 index 0000000..e2a488a --- /dev/null +++ b/brew/template.rb.j2 @@ -0,0 +1,28 @@ +class {{ formula_name }} < Formula + include Language::Python::Virtualenv + + desc "{{ package.description }}" +{% if package.homepage %} homepage "{{ package.homepage }}" +{% endif %} +{% if package.license %} license "{{ package.license }}" +{% endif %} + head "https://github.com/janw/podcast-archiver.git", branch: "main" + +{{ PACKAGE_URL }} + + depends_on "python3" + depends_on "rust" => :build + +{{ RESOURCES }} + + def install + virtualenv_create(libexec, "python3") + virtualenv_install_with_resources + + generate_completions_from_executable(bin/"podcast-archiver", shells: [:bash, :zsh, :fish], shell_parameter_format: :click) + end + + test do + false + end +end