Fix: bypass branch protection in publish workflow#15
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the manual publish workflow to authenticate actions/checkout with a repository secret (GH_PAT) so the job can push version bumps and tags to a protected main branch (assuming the PAT owner can bypass repository rules).
Changes:
- Configure
actions/checkout@v4to use${{ secrets.GH_PAT }}as the checkout token.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ secrets.GH_PAT }} |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe publish workflow now authenticates the checkout step using a GitHub personal access token (GH_PAT) instead of relying on default checkout permissions. This enables authenticated repository access for downstream build, version bump, publish, and release operations. ChangesPublish Workflow Authentication
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This PR updates the publish workflow to use the
GH_PATsecret for the checkout step. This allows the workflow to authenticate with sufficient permissions to push tags and version bumps directly to the protectedmainbranch, provided theGH_PATowner has 'Admin' bypass permissions in the repository ruleset.Summary by CodeRabbit