Repository navigation
fix: move floating major tag via GitHub API - #39
Merged
Merged
Conversation
Merged
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 release workflow failed after v1.10.0 was tagged:
Since 4265ee8,
scripts/tag.shcreates the release tag through the GitHub API instead ofgit tag+git push. That means the tag exists on GitHub but neverexists in the runner's clone. The "Update floating major tag" step still ran
git tag -f "$major" "$TAG"locally, and git couldn't find the tag.Change
The step now moves the major tag (e.g.
v1) through the API too:HEAD, the merge commit the release tag was created on.PATCH git/refs/tags/<major>(force=true). Otherwise it's created withPOST git/refs.git push, so it can't hit theGITHUB_TOKENrejection for workflow files thattag.shwas written to avoid.Notes
The major tag is now a lightweight ref pointing straight at the commit, not at the release's annotated tag object. It resolves to the same commit, so
uses: offload-project/release-champion@v1behaves the same.This change doesn't repair v1.10.0.
v1still points at v1.9.1 (db58b5c) and needs a one-time move:Testing