Repository navigation
Push the release tag with a deploy key - #45
Merged
Merged
Conversation
The "Protect release tags" ruleset rejects a v* tag created by the workflow token. The workflow now pushes the tag over SSH with the deploy key in the RELEASE_DEPLOY_KEY secret, which is in the bypass list of the ruleset, and then creates the release on that tag.
Etelis
approved these changes
Nov 20, 2026
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.
Problem
The
releasejob failed for v1.2.1 withHTTP 422: Cannot create ref due to creations being restricted. The "Protect release tags" ruleset allows only bypass actors to create av*tag, and the workflow token is not one of them, sogh release createcould not create the tag.Change
The workflow keeps creating the tag and the release by itself:
v<version>over SSH with the deploy key stored in theRELEASE_DEPLOY_KEYsecret. "Deploy keys" is in the bypass list of the ruleset.gh release create --verify-tagwith the workflow token, which attaches the wheel and the sdist to the existing tag.Setup that already exists
RELEASE_DEPLOY_KEYwith the private half.Checks
https://api.github.com/meta.