mirror of
https://github.com/easingthemes/ssh-deploy
synced 2026-04-06 04:43:02 +08:00
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>
This commit is contained in:
23
.github/workflows/update-major-tag.yml
vendored
Normal file
23
.github/workflows/update-major-tag.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Update major version tag
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
update-tag:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Update major version tag
|
||||
run: |
|
||||
VERSION="${{ github.event.release.tag_name }}"
|
||||
MAJOR="v$(echo "$VERSION" | sed 's/^v//' | cut -d. -f1)"
|
||||
echo "Updating $MAJOR tag to point to $VERSION"
|
||||
git tag -f "$MAJOR" "$VERSION"
|
||||
git push -f origin "$MAJOR"
|
||||
Reference in New Issue
Block a user