Skip to content

Use PAT token for release workflow to bypass branch protection#153

Merged
nhorton merged 1 commit intomainfrom
claude/fix-release-action-protection-3rCE9
Jan 24, 2026
Merged

Use PAT token for release workflow to bypass branch protection#153
nhorton merged 1 commit intomainfrom
claude/fix-release-action-protection-3rCE9

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 24, 2026

Summary

Updated the create-release workflow to use a Personal Access Token (PAT) instead of the default GITHUB_TOKEN when checking out the repository. This allows the release process to push commits to protected branches.

Changes

  • Replaced secrets.GITHUB_TOKEN with secrets.RELEASE_TOKEN in the checkout action
  • Added clarifying comment explaining the purpose of using a PAT with bypass permissions

Details

The default GITHUB_TOKEN has limited permissions and cannot push to branches with protection rules enabled. By using a dedicated PAT stored in RELEASE_TOKEN, the workflow can successfully create and push release commits even when the target branch has protection rules configured (e.g., requiring status checks or code reviews).

Note: The RELEASE_TOKEN secret must be configured in the repository settings with appropriate permissions before this workflow will function.

Replace GITHUB_TOKEN with RELEASE_TOKEN secret to allow
pushing directly to main branch during automated releases.
@nhorton nhorton merged commit e4fb9e7 into main Jan 24, 2026
4 checks passed
@nhorton nhorton deleted the claude/fix-release-action-protection-3rCE9 branch January 24, 2026 19:46
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