Skip to content

Commit 120a331

Browse files
authored
feat: webhook to release to homebrew (#2010)
this triggers a full workflow that eventually create a PR in hombrew-cask repo when this PR gets merged - all brew users can consume the new version
1 parent e30ed89 commit 120a331

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Notify Homebrew Tap
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
notify-homebrew:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify Homebrew tap
12+
env:
13+
TAG: ${{ github.event.release.tag_name }}
14+
HOMEBREW_TAP_REPO_TOKEN: ${{ secrets.HOMEBREW_TAP_REPO_TOKEN }}
15+
run: |
16+
echo "📢 Notifying Homebrew tap of new release $TAG..."
17+
curl -X POST \
18+
-H "Authorization: token $HOMEBREW_TAP_REPO_TOKEN" \
19+
-H "Accept: application/vnd.github.v3+json" \
20+
https://api.github.com/repos/ybeapps/homebrew-sourcegit/dispatches \
21+
-d "{\"event_type\":\"new-sourcegit-release\",\"client_payload\":{\"version\":\"$TAG\"}}"
22+
echo "✅ Homebrew tap notified successfully"

0 commit comments

Comments
 (0)