Skip to content

v1.0.11

v1.0.11 #8

name: Auto-Tag Major Version
on:
release:
types: [published]
jobs:
tag-major-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
- name: Tag Major Version
run: |
FULL_TAG=${{ github.event.release.tag_name }}
MAJOR_VERSION=$(echo "$FULL_TAG" | sed -E 's/^v([0-9]+)\..*/v\1/')
git tag -fa "$MAJOR_VERSION" -m "Update major version tag to $MAJOR_VERSION"
git push -f origin "$MAJOR_VERSION"