Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
default: 'main'
required: true

permissions:
contents: write

jobs:
re-tag:
runs-on: ubuntu-latest
Expand All @@ -27,17 +30,9 @@ jobs:
run: |
git config user.name 'github-actions'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Update tag with parameter
if: github.event.inputs.tag != ''
run: |
git tag --delete ${{ inputs.tag }} || true
git push --delete origin ${{ inputs.tag }} || true
git tag -a ${{ inputs.tag }} -m 'Retag ${{ inputs.tag }}'
git push origin ${{ inputs.tag }}
- name: Update tag to v2
if: github.event.inputs.tag == ''
- name: Update rolling tag
run: |
git tag --delete v2 || true
git push --delete origin v2 || true
git tag -a v2 -m 'Retag v2'
git push origin v2
# Get the major version from the latest tag
MAJOR_VERSION=`git tag --list --sort=-v:refname | head -n1 | cut -d. -f1`
git tag --force --annotate ${{ inputs.tag || '$MAJOR_VERSION' }} --message 'Retag ${{ inputs.tag || '$MAJOR_VERSION' }}'
git push origin ${{ inputs.tag || '$MAJOR_VERSION' }} --force
Loading