Moves a major tag (vX) to the same commit as a full release tag (vX.Y.Z).
Example: when v2.4.1 is pushed, this action force-updates v2 to that commit.
- Workflow permission:
contents: write - Repository checkout before running this action (
fetch-depth: 0recommended)
tag(optional): Full release tag invX.Y.Zformat. Default:${{ github.ref_name }}github-token(optional): Token used to push tags. Default:${{ github.token }}
major-tag: Computed major tag (vX)
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
update-major-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
# If used from another repo:
- uses: loilo-inc/actions-semantic-release@v1
# If used inside this same repo, use:
# - uses: ./- The action validates that the tag matches
^v[0-9]+\.[0-9]+\.[0-9]+$. - It force-updates the major tag (
git tag -fandgit push -f).