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: Release | |
on: | |
release: | |
types: [released] | |
jobs: | |
update_major_tag: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.HCLOUD_BOT_TOKEN }} | |
fetch-depth: 0 | |
- name: Extract major from version | |
id: major | |
run: awk -F '.' '{print "major=" $1}' <<< '${{ github.event.release.tag_name }}' >> "$GITHUB_OUTPUT" | |
- name: Update major tag | |
run: git tag --force "${{ steps.major.outputs.major }}" "${{ github.event.release.tag_name }}" | |
- name: Push updated major tag | |
run: git push --force origin "${{ steps.major.outputs.major }}" |