Fix GoReleaser homebrew publish to use PR flow#3
Merged
Conversation
The brew publish on v0.0.1-beta failed because GoReleaser was trying
to push the formula directly to homebrew-tap's `main` branch (blocked
by branch protection), then attempted a fork-sync (no fork exists),
then gave up.
Two config bugs:
1. `repository.branch` wasn't set, so GoReleaser defaulted to `main`
and pushed there instead of creating a feature branch. Set it to
`band-{{.Version}}` so each release gets its own branch.
2. `pull_request.base.owner` and `base.name` were set to the same
values as `repository.owner/name`, which makes GoReleaser think
this is a cross-repo (fork-based) PR flow. Remove them — when
only `base.branch` is set, GoReleaser uses the same-repo
branch-and-PR flow, which is what we want here.
Also name the formula `band.rb` explicitly (via `brews[].name: band`)
so `brew install Bandwidth/tap/band` resolves — the default was
`cli.rb` (after the repo name), which didn't match the binary name.
joshraub-bw
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
v0.0.1-betarelease failed at the homebrew publish step. Root cause: thebrewsblock in.goreleaser.ymlwas misconfigured.What went wrong on the run:
/merge-upstream).Bandwidth/homebrew-tapmain, which is blocked by branch protection.The two bugs:
repository.branchwasn't set → GoReleaser defaulted to pushing tomaininstead of a feature branch. Fixed by setting it toband-{{.Version}}.pull_request.base.ownerandbase.nameduplicatedrepository.owner/name→ GoReleaser treated this as a cross-repo fork-based PR flow. Removed them so onlybase.branch: mainremains, which triggers the same-repo branch-and-PR flow.Also named the formula
band.rb(viabrews[].name: band) sobrew install Bandwidth/tap/bandresolves — default wascli.rbafter the repo name.Test plan
v0.0.1-betatag + GitHub Release, re-tag to re-triggerband-v0.0.1-betabranch onBandwidth/homebrew-tapand opens a PR againstmainband.rb