Skip to content

Commit b22c09a

Browse files
committed
Fix GoReleaser homebrew publish to actually use the PR flow
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.
1 parent f2150c0 commit b22c09a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.goreleaser.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ docker_manifests:
5252
- "ghcr.io/bandwidth/cli:{{ .Version }}-arm64"
5353

5454
brews:
55-
- repository:
55+
- name: band
56+
repository:
5657
owner: Bandwidth
5758
name: homebrew-tap
59+
branch: "band-{{.Version}}"
5860
token: "{{ .Env.HOMEBREW_TAP_TOKEN }}"
5961
pull_request:
6062
enabled: true
6163
base:
62-
owner: Bandwidth
63-
name: homebrew-tap
6464
branch: main
6565
homepage: "https://github.com/Bandwidth/cli"
6666
description: "Bandwidth CLI — manage voice, messaging, numbers, and more from the command line"

0 commit comments

Comments
 (0)