Move main version to v1.0.0 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |