ci: trigger homebrew-tap formula bump on release#355
Conversation
Drop goreleaser's direct Homebrew publishing, which required Contents and Pull request write access that the tap's GitHub App token does not grant. Instead, dispatch the tap's bump-formula workflow with the App token (needs only Actions: write), matching the pattern used by other block repositories.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f80ec0d97
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| gh workflow run bump-formula.yaml \ | ||
| --repo block/homebrew-tap \ | ||
| -f repo=block/cachew \ | ||
| -f formula=cachew \ |
There was a problem hiding this comment.
Seed the Homebrew formula before bumping it
On the first cachew tag after this merges, this dispatch will not create the initial tap formula: the block/homebrew-tap bump workflow runs scripts/bump-and-pr.py, which looks for Formula/${formula}.rb and exits if it does not already exist, and the tap's current Formula/ directory does not contain cachew.rb. Since this commit also removes the GoReleaser brews stanza that could create that file, the release will publish GitHub assets but the Homebrew update will fail asynchronously until the formula is seeded or creation is handled before dispatch.
Useful? React with 👍 / 👎.
Drop goreleaser's direct Homebrew publishing, which required Contents
and Pull request write access that the tap's GitHub App token does not
grant. Instead, dispatch the tap's bump-formula workflow with the App
token (needs only Actions: write), matching the pattern used by other
block repositories.