Skip to content

ci(release): authenticate Homebrew tap push with HOMEBREW_TAP_TOKEN#21

Merged
piyushsarin-sib merged 1 commit into
mainfrom
ci/fix-homebrew-bump-tap-auth
Jun 5, 2026
Merged

ci(release): authenticate Homebrew tap push with HOMEBREW_TAP_TOKEN#21
piyushsarin-sib merged 1 commit into
mainfrom
ci/fix-homebrew-bump-tap-auth

Conversation

@piyushsarin-sib

Copy link
Copy Markdown
Collaborator

Summary

  • Fix the Bump Homebrew formula step failing with 403: Permission to getbrevo/homebrew-tap.git denied to github-actions[bot] on the 1.1.1 release run: changesets/action writes ~/.netrc containing the repo-scoped GITHUB_TOKEN, so the bare git push to the tap authenticated as github-actions[bot] (which has no access to the tap) instead of using HOMEBREW_TAP_TOKEN. The step now removes the stale netrc and runs gh auth setup-git before pushing, so git resolves credentials through gh from GH_TOKEN (the tap PAT) — still keeping the token out of argv, the remote URL, and on-disk config.
  • Document the changeset policy in AGENTS.md and CLAUDE.md: keep one pending changeset file per branch/PR — append new change details to it (raising the bump level if needed) instead of creating additional files.

Notes for reviewers

  • release.yaml security invariants are untouched: action SHA pins, persist-credentials: false, OIDC/no-NPM_TOKEN publish auth, and HOMEBREW_TAP_TOKEN scoping are all unchanged. The fix only affects how the existing PAT reaches git push.
  • Removing ~/.netrc is safe — the bump step is the job's last step, and every other step authenticates via env tokens, not netrc.
  • Worth verifying alongside this PR: HOMEBREW_TAP_TOKEN hasn't hit its expiry and still has contents + pull-requests write on the tap (an expired token would surface as a 401 on the next run).
  • The missed 1.1.1 formula bump will be replayed with a manual PR on the tap; this fix covers releases going forward.
  • No changeset: CI + contributor-docs only, no user-visible CLI behavior. agent-context/SKILL.md / agent-context/AGENTS.md untouched (no CLI surface change).

🤖 Generated with Claude Code

The "Bump Homebrew formula" step failed with 403: changesets/action
writes ~/.netrc with the repo-scoped GITHUB_TOKEN, so the bare git
push authenticated as github-actions[bot], which has no access to
getbrevo/homebrew-tap. Remove the stale netrc and run gh auth
setup-git before pushing so git resolves credentials through gh from
GH_TOKEN (the tap PAT) — keeping the token out of argv, the remote
URL, and on-disk config.

Also document the changeset policy in AGENTS.md and CLAUDE.md: keep
one pending changeset file per branch/PR — append new change details
to it (raising the bump level if needed) instead of creating
additional files.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@piyushsarin-sib piyushsarin-sib self-assigned this Jun 5, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

@piyushsarin-sib piyushsarin-sib merged commit 40874a1 into main Jun 5, 2026
5 checks passed
@piyushsarin-sib piyushsarin-sib deleted the ci/fix-homebrew-bump-tap-auth branch June 5, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant