Skip to content

Move main version to v1.1.0 #2

Move main version to v1.1.0

Move main version to v1.1.0 #2

name: Update main version
run-name: Move main version to ${{ github.ref_name }}
on:
release:
types: [published]
permissions:
contents: write
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.email 'github-actions[bot]@users.noreply.github.com'
git config user.name 'github-actions[bot]'
- name: Set main version
id: set-main-version
run: |
main_version="$(echo "${{ github.ref_name }}" | grep -oP "^(v\d+)")"
echo "main-version=${main_version}" >> "${GITHUB_OUTPUT}"
- name: Tag new target
run: git tag --force ${{ steps.set-main-version.outputs.main-version }} ${{ github.ref_name }}
- name: Push new tag
run: git push --force origin ${{ steps.set-main-version.outputs.main-version }}