fix(ci): fix release automation — use ADMIN_TOKEN for protected branches#28
Merged
Conversation
…d branches Root cause: GITHUB_TOKEN cannot push commits to protected branches. Semantic-release created the v0.3.0 tag (tags bypass protection) but the "chore: release 0.3.0" commit that bumps pyproject.toml was orphaned. - Use ADMIN_TOKEN for checkout and semantic-release (can push to main) - Add skip-check to prevent infinite loops on release commits - Sync pyproject.toml version to 0.3.0 (matches latest tag) Prerequisite: Add ADMIN_TOKEN secret (GitHub PAT with repo scope) to repository settings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Root cause
GITHUB_TOKENcannot push commits to branches with protection rules. Semantic-release successfully created thev0.3.0tag (tags bypass protection) but thechore: release 0.3.0commit that updates pyproject.toml became orphaned — never landed on main. Every subsequent run says "0.3.0 has already been released!" because the tag exists.Changes
release.yml: UseADMIN_TOKENfor checkout and semantic-release actionsrelease.yml: Add author-check skip step for "semantic-release" commitspyproject.toml: Sync version to 0.3.0Prerequisite
Add
ADMIN_TOKENsecret (GitHub PAT withreposcope) to repository settings at:https://github.com/OpenAdaptAI/openadapt-evals/settings/secrets/actions
🤖 Generated with Claude Code