Skip to content

Automate major version floating tag updates#205

Open
ZachGoldberg wants to merge 1 commit intomainfrom
automate-major-version-tag
Open

Automate major version floating tag updates#205
ZachGoldberg wants to merge 1 commit intomainfrom
automate-major-version-tag

Conversation

@ZachGoldberg
Copy link
Copy Markdown
Contributor

Summary

  • Adds a GitHub Actions workflow that automatically updates the major version floating tag (e.g. v4) whenever a new release is published
  • Pre-releases are skipped
  • Closes Automate Update of Major Version Tags #7

How it works

On releasepublished, the workflow extracts the major version from the tag name (e.g. v4 from v4.12.0) and force-pushes the floating tag to point to it.

Test plan

  • Verify the workflow file is valid YAML and the trigger/permissions are correct
  • After merging, create a test release and confirm the floating tag is updated

🤖 Generated with Claude Code

When a new release is published, this workflow extracts the major version
(e.g. v4 from v4.12.0) and force-pushes the floating tag to point to it.
Pre-releases are skipped.

Closes #7
env:
TAG: ${{ github.event.release.tag_name }}
run: |
MAJOR=$(echo "$TAG" | grep -oP '^v\d+')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Ensure only valid semver tags are matched.
  • Do not run if tag contains prerelease e.g 2.0.1-rc1
  • Check all tags and verify that this is the highest tag for this version e.g. if 2.7.3 exists, and this is 2.6.9, do not update the major tag.

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.

Automate Update of Major Version Tags

2 participants