Skip to content

Commit 84ebfe8

Browse files
committed
fix(ci): skip Homebrew publish when HOMEBREW_TAP_TOKEN is unset
GoReleaser valid skip flag is 'homebrew'; avoids 401 failing the job after GitHub release assets are already uploaded. Made-with: Cursor
1 parent 4768f80 commit 84ebfe8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ jobs:
128128
with:
129129
go-version: "1.22"
130130

131+
# Without HOMEBREW_TAP_TOKEN, publishing the tap fails with 401 and marks the job failed
132+
# even though the GitHub release assets already uploaded.
131133
- uses: goreleaser/goreleaser-action@v6
132134
with:
133135
version: latest
134-
args: release --clean
136+
args: release --clean${{ secrets.HOMEBREW_TAP_TOKEN == '' && ' --skip=homebrew' || '' }}
135137
env:
136138
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
137139
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}

0 commit comments

Comments
 (0)