ci(release): idempotent tag handling for v6.2.0 recovery#10
Merged
Conversation
When the workflow's PAT_TOKEN lacks push-tag permission to this org repo (the v6.2.0 release hit this), the maintainer can push the tag locally and re-dispatch the workflow. Previously the "Check if tag already exists" step errored out fatally; now we fetch tags, reuse one if present, and only create+push when the tag's missing. This also lets us recover from a half-completed earlier run without having to delete the tag and rebuild from scratch. No behaviour change on a clean run from a writable PAT_TOKEN: the fetch is a no-op, the rev-parse misses, and the create+push branch fires exactly as before. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Why
The v6.2.0 Manual Release workflow failed at the "Create and push tag" step:
Same shape as the previous attempt on 2026-05-17. The
PAT_TOKENsecret in the repo doesn't have push-tag permission on this org repo.I pushed
v6.2.0from local (where I do have write access). Now I need the workflow to accept that and continue with the lint/typecheck/test/publish jobs against the existing tag, instead of erroring out on the existence check.What this PR does
Then
Re-dispatch the Manual Release workflow with
version=6.2.0,pypi_environment=pypi. The validate-and-tag job will now skip tag creation and pass through; the downstream jobs (lint / typecheck / test / e2e-test / publish) will run against the tag and publish to PyPI.