Skip to content

Commit 76668b2

Browse files
easingthemesclaude
andcommitted
chore: add workflow to auto-update major version tag on release
Adds update-major-tag.yml that triggers on any published release and force-updates the major version tag (e.g., v6) to point to the latest release (e.g., v6.0.1). Enables users to pin to @v6 instead of full version numbers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent be39df3 commit 76668b2

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Update major version tag
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
update-tag:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- uses: actions/checkout@v6
15+
with:
16+
fetch-depth: 0
17+
- name: Update major version tag
18+
run: |
19+
VERSION="${{ github.event.release.tag_name }}"
20+
MAJOR="v$(echo "$VERSION" | sed 's/^v//' | cut -d. -f1)"
21+
echo "Updating $MAJOR tag to point to $VERSION"
22+
git tag -f "$MAJOR" "$VERSION"
23+
git push -f origin "$MAJOR"

0 commit comments

Comments
 (0)