Skip to content

fix: move floating major tag via GitHub API - #39

Merged
shavonn merged 1 commit into
mainfrom
fix/tag-pattern-match
Sep 13, 2026
Merged

shavonn merged 1 commit into
mainfrom
fix/tag-pattern-match

Conversation

@shavonn

@shavonn shavonn commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Problem

The release workflow failed after v1.10.0 was tagged:

  fatal: Failed to resolve 'v1.10.0' as a valid ref.

Since 4265ee8, scripts/tag.sh creates the release tag through the GitHub API instead of git tag + git push. That means the tag exists on GitHub but never
exists 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:

  • It points the major tag at HEAD, the merge commit the release tag was created on.
  • If the major tag already exists, it's updated with PATCH git/refs/tags/<major> (force=true). Otherwise it's created with POST git/refs.
  • It no longer uses git push, so it can't hit the GITHUB_TOKEN rejection for workflow files that tag.sh was 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@v1 behaves the same.

  • This change doesn't repair v1.10.0. v1 still points at v1.9.1 (db58b5c) and needs a one-time move:

    gh api -X PATCH repos/offload-project/release-champion/git/refs/tags/v1 \
      -f sha=6d491c9ae8ab5dcf71c94a1451475045d52fc8d3 -F force=true
    

Testing

  • The workflow YAML parses.
  • The step hasn't run in Actions yet. It will first run on the next release PR merge.

@shavonn
shavonn merged commit 6eb806e into main Sep 13, 2026
@shavonn
shavonn deleted the fix/tag-pattern-match branch September 13, 2026 22:49
@github-actions github-actions Bot mentioned this pull request Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant