Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Publish to homebrew-tap #67

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
28 changes: 28 additions & 0 deletions brew/template.rb.j2
Original file line number Diff line number Diff line change
@@ -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
Loading