Skip to content

Commit

Permalink
add workflow to move tags
Browse files Browse the repository at this point in the history
  • Loading branch information
sks committed May 29, 2024
1 parent 2292486 commit 30f18ea
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tags.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Update Major & Minor Release Tag

on:
push:
tags:
- 'v*.*.*'

jobs:
movetag:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Get major version num and update tag
run: |
VERSION=${GITHUB_REF#refs/tags/}
MAJOR=${VERSION%%.*}
MAJOR_MINOR=${VERSION%.*}
git config --global user.name 'appcd-bot'
git config --global user.email 'appcd-bot@users.noreply.github.com'
git tag -fa "${MAJOR}" -m 'Update major version tag'
git tag -fa "${MAJOR_MINOR}" -m 'Update minor version tag'
git push origin "${MAJOR}" --force
git push origin "${MAJOR_MINOR}" --force

0 comments on commit 30f18ea

Please sign in to comment.