Skip to content

Update for 5.0.0

Update for 5.0.0 #78

name: Update Major Version
run-name: Update for ${{ github.event.release.tag_name }}
on:
release:
types:
- released
tags-ignore:
- v1.*
- v2.*
- v3.*
- v4.*
- 1.*
- 2.*
- 3.*
- 4.*
workflow_dispatch:
inputs:
target:
description: The tag or reference to use
required: true
major_version:
type: choice
description: The major version to update
options:
- "5"
permissions: write-all
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Get versions
id: version
run: |
TAG=${{ github.event.release.tag_name }}
echo "full_version=${TAG}" >> $GITHUB_OUTPUT
echo "major_version=v${TAG:0:1}" >> $GITHUB_OUTPUT
- name: Show versions
run: |
echo "Major is ${{ steps.version.outputs.major_version }}"
echo "Full is ${{ steps.version.outputs.full_version }}"
- name: Tag new target
run: git tag -f "${{ steps.version.outputs.major_version }}" "${{ steps.version.outputs.full_version }}"
- name: Push new tag
run: git push origin "${{ steps.version.outputs.major_version }}" --force