Repository navigation
Release from a workflow run so only it can push version tags - #165
Merged
Merged
Conversation
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.
Releases now go through a workflow, so nobody can push version tags by hand (a new
v*tag ruleset blocks it for everyone, including admins).How to release: bump
versioninpyproject.tomlin a PR, merge it, then run Actions → Release → Run workflow onmain. It pushesvX.Y.Zwith a deploy key, which starts the Publish workflow, which publishes to PyPI and creates the GitHub release.release.yml(new): runs only onmain(thereleaseenvironment, which holds the deploy key, only allowsmain). The version must be plainX.Y.Z. A version already tagged on another commit fails with a hint to bump it.publish.yml(wasrelease.yml, triggered by the tag as before):python3 setup.py --version, butsetup.pywas removed in the switch topyproject.toml(Feb 2025), so every release since would have failed. The check is gone: the tag now always comes frompyproject.toml.actions/checkout@v2→@v7, and the archivedactions/create-release@v1→gh release create, as in the JS repos. This path has not run since 2024.Settings already applied:
releaseenvironment withRELEASE_DEPLOY_KEY, deploy key,version tagsruleset.