fix(ci): use built-in GITHUB_TOKEN for Release instead of PAT#60
Merged
Conversation
The Release workflow failed at the actions/checkout step (`could not read Username`) because the GH_TOKEN PAT is no longer a valid credential. Rather than maintaining a PAT, grant the job the permissions it needs (contents + pull-requests write) and use the token GitHub generates automatically — the same approach the passing test/e2e workflows already rely on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
alexander-rw
approved these changes
Jun 29, 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.
Problem
Every
Releaserun fails at theactions/checkoutstep:The workflow checks out with
token: ${{ secrets.GH_TOKEN }}, and that PAT is no longer a valid credential (rotation didn't resolve it). Therun-tests/e2eworkflows pass on the same commits because they use the default GitHub-generated token.Change
Applying the review suggestion: drop the PAT and use the token GitHub generates, granting the job only the permissions it needs.
permissionsblock:contents: write(push tags / version commits / create release) andpull-requests: write(changesets opens the "New Release" PR).token:from checkout so it uses the defaultgithub.token.gh auth loginin the release step at${{ secrets.GITHUB_TOKEN }}.Tradeoff
Commits/PRs created with the built-in
GITHUB_TOKENdo not trigger downstream workflows. So the changesets "New Release" PR won't auto-runrun-tests/e2e— they'll run once a human pushes to or merges that branch. This is the documented changesets reason a PAT is sometimes used; the review accepts it.Verification
Merging to
mastertriggersRelease; getting past checkout (where every prior run died) confirms the fix.🤖 Generated with Claude Code