Skip to content

Update for 3.14.0

Update for 3.14.0 #65

name: Update Major Version
run-name: Update for ${{ github.event.release.tag_name }}
on:
release:
types:
- released
tags-ignore:
- v1.*
workflow_dispatch:
inputs:
target:
description: The tag or reference to use
required: true
major_version:
type: choice
description: The major version to update
options:
- v3
- v2
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 "action@github.com"
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=${TAG:0:2}" >> $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