fix(ci): make RC/Nightly tag publish rerun-safe (#487)#488
Merged
Conversation
A re-run of the Publish step (e.g. after a partial RC where some platform jobs were re-run) aborted with "fatal: tag already exists" (exit code 128): git fetch pulls the tag the earlier run created, and `git tag -s "$TAG"` then refuses to overwrite it, so the pre-release stayed incomplete. Make tag creation idempotent in cd-release-candidate.yml and cd-nightly.yml: - delete any stale local tag before recreating it, - force-push so a re-run can update the existing ref, - fall back to PATCH if the ref-create API reports the ref already exists. cd-release.yml already handles this (existing-release check + ref-create with "|| continue") and is left unchanged. Closes #487
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.
Fixes the
fatal: tag already exists(exit 128) that aborts a Publish re-run.Root cause:
git fetchpulls the tag an earlier Publish run created;git tag -sthen refuses to overwrite it, so a partial RC's macOS-ARM artifacts never get appended.Fix (cd-release-candidate.yml + cd-nightly.yml):
git tag -d $TAG || truebefore recreating (drops stale local tag)git push --forceso a re-run updates the existing refcd-release.ymlalready handled this and is unchanged.Closes #487