Skip to content

loilo-inc/actions-semantic-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update Major Semver Tag Action

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.

Requirements

  • Workflow permission: contents: write
  • Repository checkout before running this action (fetch-depth: 0 recommended)

Inputs

  • tag (optional): Full release tag in vX.Y.Z format. Default: ${{ github.ref_name }}
  • github-token (optional): Token used to push tags. Default: ${{ github.token }}

Outputs

  • major-tag: Computed major tag (vX)

Usage

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: ./

Notes

  • The action validates that the tag matches ^v[0-9]+\.[0-9]+\.[0-9]+$.
  • It force-updates the major tag (git tag -f and git push -f).

About

Github Action that update git tag based on semver.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages