Push release commits with the release token - #5
Merged
Merged
Conversation
actions/checkout persisted the workflow token as the git credential, so semantic-release pushed the release commit with it and the main ruleset rejected the push. The release token was only used for the GitHub API. Check out with the release token instead, so every git push in the job uses it, including the major version tag. Assisted-by: Claude <noreply@anthropic.com>
kasperg
force-pushed
the
fix-release-push
branch
from
September 15, 2026 13:14
de86e36 to
2860984
Compare
|
🎉 This PR is included in version 0.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
The first release run after #4 failed: semantic-release pushed the
chore(release)commit and themainruleset rejected it with GH013. The job hadGH_RELEASE_TOKEN, butactions/checkouthad persisted the workflow token as the git credential, so git used that instead. The release token only reached the GitHub API calls.This checks out with the release token, so every git push in the job goes through the bypass-listed account, including the major version tag. It is the setup the semantic-release action's own README prescribes for protected branches.
Verified with actionlint. The real test is the release run after merging: it must create the tag, the GitHub release and the major version tag.