Skip to content

Commit 9f6d5de

Browse files
committed
chore: consolidate PyPI and Homebrew release workflows
- Merge release-bump.yml into publish-pypi.yml - Homebrew notification now depends on PyPI publish success - Ensures Homebrew formula updates only after package is available on PyPI
1 parent ee3f476 commit 9f6d5de

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish to PyPI
1+
name: Publish to PyPI and Update Homebrew
22

33
on:
44
release:
@@ -35,3 +35,20 @@ jobs:
3535
with:
3636
user: __token__
3737
password: ${{ secrets.PYPI_API_TOKEN }}
38+
39+
notify-homebrew:
40+
runs-on: ubuntu-latest
41+
needs: build-and-publish # Only run after PyPI publish succeeds
42+
if: github.event_name == 'release' # Only for releases, not manual workflow_dispatch
43+
44+
steps:
45+
- name: Send dispatch to homebrew-chuck
46+
uses: peter-evans/repository-dispatch@v3
47+
with:
48+
token: ${{ secrets.RELEASE_UPDATE_TOKEN }}
49+
repository: amperity/homebrew-chuck-data
50+
event-type: update-chuck-data-formula
51+
client-payload: |
52+
{
53+
"version": "${{ github.event.release.tag_name }}"
54+
}

.github/workflows/release-bump.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)