Skip to content

Commit

Permalink
build: Publish brew formula
Browse files Browse the repository at this point in the history
  • Loading branch information
janw committed Jan 31, 2024
1 parent 1b9ce30 commit 6782b04
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
tags:
- "v*.*.*"
branches:
- "publish-to-brew-tap" #FIXME: REMOVE
pull_request:

jobs:
Expand Down Expand Up @@ -45,3 +47,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 }}
26 changes: 26 additions & 0 deletions brew/template.rb.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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
end

test do
false
end
end

0 comments on commit 6782b04

Please sign in to comment.