mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-20 21:01:06 +08:00
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
This commit is contained in:
22
.github/workflows/homebrew-notify.yml
vendored
Normal file
22
.github/workflows/homebrew-notify.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Notify Homebrew Tap
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
notify-homebrew:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Notify Homebrew tap
|
||||
env:
|
||||
TAG: ${{ github.event.release.tag_name }}
|
||||
HOMEBREW_TAP_REPO_TOKEN: ${{ secrets.HOMEBREW_TAP_REPO_TOKEN }}
|
||||
run: |
|
||||
echo "📢 Notifying Homebrew tap of new release $TAG..."
|
||||
curl -X POST \
|
||||
-H "Authorization: token $HOMEBREW_TAP_REPO_TOKEN" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/ybeapps/homebrew-sourcegit/dispatches \
|
||||
-d "{\"event_type\":\"new-sourcegit-release\",\"client_payload\":{\"version\":\"$TAG\"}}"
|
||||
echo "✅ Homebrew tap notified successfully"
|
||||
Reference in New Issue
Block a user