Skip to content

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

Merged
jancurn merged 2 commits intomainfrom
claude/fix-release-action-rules-OVmW4
Mar 17, 2026
Merged

Use PAT token for release workflow to bypass branch protection#86
jancurn merged 2 commits intomainfrom
claude/fix-release-action-rules-OVmW4

Conversation

@jancurn
Copy link
Member

@jancurn jancurn commented Mar 17, 2026

Summary

Updated the release workflow to use a Personal Access Token (PAT) instead of the default GITHUB_TOKEN when checking out the repository. This allows the release job to push version-bump commits and tags directly to main, bypassing branch protection rulesets that block the default token.

Key Changes

  • Modified .github/workflows/release.yml to add token: ${{ secrets.RELEASE_PAT }} to the checkout action
  • Added explanatory comments documenting why the PAT is necessary for bypassing branch protection rules

Implementation Details

The change leverages GitHub Actions' support for custom tokens in the checkout action. By using a PAT stored in secrets.RELEASE_PAT, the release workflow can perform protected operations (pushing commits and tags to main) that would otherwise be blocked by branch protection rulesets configured to restrict the default GITHUB_TOKEN.

https://claude.ai/code/session_01Jhq1SCwkA8r1PBoTMSMmR9

claude added 2 commits March 17, 2026 11:16
…rules

The default GITHUB_TOKEN cannot push to main when repository rulesets
require the "Apify pull request toolkit" workflow (which only runs on PRs).
Using a PAT at checkout time allows git push to bypass this restriction.

https://claude.ai/code/session_01Jhq1SCwkA8r1PBoTMSMmR9
@jancurn jancurn merged commit 4833850 into main Mar 17, 2026
6 checks passed
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.

3 participants