ci: auto-bump Homebrew formula on release - #546
Conversation
On a published release, update the tap formula's url + sha256 to the new tag. Requires a HOMEBREW_TAP_TOKEN secret (PAT with contents:write on Sapd/homebrew-headsetcontrol).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd4c25a0b7
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| release: | ||
| types: [published] |
There was a problem hiding this comment.
Run the formula bump from the release workflow
When releases are created by the repository's existing .github/workflows/release.yml, the ncipollo/release-action is explicitly authenticated with secrets.GITHUB_TOKEN (release.yml:88-100). GitHub does not start new workflow runs for events generated by that token, so its published release event will not invoke this workflow; normal tagged releases therefore leave the Homebrew formula unchanged unless someone manually dispatches this workflow. Add the bump as a job in the release pipeline or create the release with a token that can trigger downstream workflows.
Useful? React with 👍 / 👎.
Deploy keys can be created via the API (a PAT cannot) and are scoped to the single tap repo. Uses secret HOMEBREW_TAP_DEPLOY_KEY.
On a published release, updates the tap formula (
Sapd/homebrew-headsetcontrol) to the new tarball URL + sha256 and pushes.Setup needed: add a repo secret
HOMEBREW_TAP_TOKEN— a PAT withcontents:writeon the tap repo.Validated: actionlint clean. Version auto-derives from the URL in the formula (so the
inreplaceversion hack keeps working). Only the stableurl/sha256lines change;headis untouched. Idempotent (no-op if already current). First real validation is the next release (orworkflow_dispatchwith a tag).