Skip to content

Commit c917cc7

Browse files
bpauliclaude
andcommitted
ci: auto-trigger homebrew-tap formula update on release
Add an update-homebrew job to the release workflow that dispatches the update-formula workflow in bpauli/homebrew-tap after GoReleaser completes. Requires a TAP_GITHUB_TOKEN secret with cross-repo workflow dispatch permissions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cc5d8ca commit c917cc7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,26 @@ jobs:
4444
args: release --clean --config /tmp/.goreleaser.yaml
4545
env:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
update-homebrew:
49+
needs: goreleaser
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Get tag
53+
id: tag
54+
run: |
55+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
56+
echo "tag=${{ inputs.tag }}" >> "$GITHUB_OUTPUT"
57+
else
58+
echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
59+
fi
60+
61+
- name: Trigger homebrew-tap update
62+
run: |
63+
gh workflow run update-formula.yml \
64+
--repo bpauli/homebrew-tap \
65+
--field formula=gccli \
66+
--field tag=${{ steps.tag.outputs.tag }} \
67+
--field repository=bpauli/gccli
68+
env:
69+
GH_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)