Skip to content

fix: use GH_TOKEN PAT for semantic-release to bypass tag ruleset#14

Open
Lefix2 wants to merge 2 commits intomainfrom
claude/fix-semantic-release-use-pat
Open

fix: use GH_TOKEN PAT for semantic-release to bypass tag ruleset#14
Lefix2 wants to merge 2 commits intomainfrom
claude/fix-semantic-release-use-pat

Conversation

@Lefix2
Copy link
Copy Markdown
Owner

@Lefix2 Lefix2 commented May 3, 2026

Summary

  • GITHUB_TOKEN (run as github-actions[bot]) is blocked by the repository ruleset: it cannot create tags (GH013: Cannot create ref due to creations being restricted)
  • Switching to a PAT (GH_TOKEN) from an admin account bypasses both the tag creation ruleset and the protected branch rule for the version-bump commit

Setup required

Create a classic PAT (or fine-grained) on a Repository Admin account with:

  • repo scope (classic PAT)

Then add it as a repository secret: Settings → Secrets and variables → Actions → GH_TOKEN

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp


Generated by Claude Code

claude added 2 commits May 3, 2026 13:41
GITHUB_TOKEN (github-actions[bot]) cannot create tags due to repository
ruleset restrictions. A PAT from an admin account stored as GH_TOKEN
bypasses both the tag creation ruleset and the protected branch rule.

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp
GitHub reserves the GITHUB_ prefix for built-in secrets, so the secret
must be named GH_PAT.

https://claude.ai/code/session_01V2Cfo3mjjVxW1iuVhavsXp
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.

2 participants