Skip to content

ci: workflow handle carrying major tag forth#13

Merged
shavonn merged 1 commit into
mainfrom
ci/add-major-v-force
Apr 1, 2026
Merged

ci: workflow handle carrying major tag forth#13
shavonn merged 1 commit into
mainfrom
ci/add-major-v-force

Conversation

@shavonn
Copy link
Copy Markdown
Contributor

@shavonn shavonn commented Apr 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 1, 2026 01:38
@shavonn shavonn merged commit 372a835 into main Apr 1, 2026
1 check passed
@shavonn shavonn deleted the ci/add-major-v-force branch April 1, 2026 01:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the release GitHub Actions workflow to expose the release action’s outputs and add a post-release step that maintains a floating major version tag (e.g., v1) pointing at the latest released version tag.

Changes:

  • Assign an id: release to the local release action step to access steps.release.outputs.*.
  • Add a step that extracts the major (vN) from the created tag and force-updates/pushes the major tag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if: steps.release.outputs.tag
run: |
major=$(echo "${{ steps.release.outputs.tag }}" | grep -oE '^v[0-9]+')
git tag -f "$major" "${{ steps.release.outputs.tag }}"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

steps.release.outputs.tag is created as an annotated tag (see scripts/finalize-release.sh), so git tag -f "$major" "${{ steps.release.outputs.tag }}" will make the floating major tag point to the tag object rather than the underlying commit (a tag-of-a-tag). This can confuse tooling that expects the ref to resolve directly to a commit; peel the tag to its commit (e.g., dereference to the tagged commit) before retagging.

Suggested change
git tag -f "$major" "${{ steps.release.outputs.tag }}"
git tag -f "$major" "${{ steps.release.outputs.tag }}^{commit}"

Copilot uses AI. Check for mistakes.
run: |
major=$(echo "${{ steps.release.outputs.tag }}" | grep -oE '^v[0-9]+')
git tag -f "$major" "${{ steps.release.outputs.tag }}"
git push origin "$major" --force
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git push origin "$major" --force can race if two release workflows run close together (e.g., multiple PRs merged in quick succession for the same major), potentially moving the floating major tag backwards. Consider adding a concurrency group for this workflow/job (or otherwise ensuring only one run can update the major tag at a time) to avoid non-deterministic tag state.

Copilot uses AI. Check for mistakes.
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.

2 participants