Skip to content

Push release commits with the release token - #5

Merged
kasperg merged 1 commit into
mainfrom
fix-release-push
Sep 15, 2026
Merged

kasperg merged 1 commit into
mainfrom
fix-release-push

Conversation

@kasperg

@kasperg kasperg commented Sep 15, 2026

Copy link
Copy Markdown
Member

The first release run after #4 failed: semantic-release pushed the chore(release) commit and the main ruleset rejected it with GH013. The job had GH_RELEASE_TOKEN, but actions/checkout had 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.

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
kasperg merged commit 8124e45 into main Sep 15, 2026
2 checks passed
@reload-upsun

Copy link
Copy Markdown

🎉 This PR is included in version 0.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants