diff --git a/.github/workflows/automated-main-merge.yml b/.github/workflows/automated-main-merge.yml index 80048aaf..eeb4eb1f 100644 --- a/.github/workflows/automated-main-merge.yml +++ b/.github/workflows/automated-main-merge.yml @@ -11,25 +11,25 @@ permissions: jobs: update-floating-tag: - name: Update floating tag to point to latest commit + name: Update floating tag to point to latest commit runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v6 with: - fetch-depth: 0 + fetch-depth: 0 - name: Check if floating tag exists id: check-floating-tag run: | git config user.name "github-actions" git config user.email "github-actions@github.com" - LATEST_TAG=$(git tag --list 'v*' --sort=-v:refname | head -n1) + LATEST_FLOATING_VERSION=$(git tag --list 'v*' --sort=-v:refname | head -n1) + floating_tag="v${LATEST_FLOATING_VERSION#v}" # strip the leading "v" if present echo "Found tag ${floating_tag} re-creating it to point to latest commit" - git tag -d v$floating_tag + git tag -d $floating_tag echo "${floating_tag} Deleted." - git tag -a v$floating_tag -m "Floating tag for v${floating_tag}" + git tag -a $floating_tag -m "Floating tag for ${floating_tag}" echo "${floating_tag} Re-created pointing to ${{github.sha}}." git push origin --tags echo "${floating_tag} Pushed." - diff --git a/.github/workflows/tool-create-release.yml b/.github/workflows/tool-create-release.yml index 6091ef5d..e9c06100 100644 --- a/.github/workflows/tool-create-release.yml +++ b/.github/workflows/tool-create-release.yml @@ -49,6 +49,16 @@ jobs: git tag $tag git push origin $tag + - name: Update floating tag (minor versions) + if: endsWith(env.tag, '.0.0') != true + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com" + floating_tag="v${tag%%.*}" + git tag -d $floating_tag + git tag -a $floating_tag -m "Floating tag for v${tag%%.*}" + git push origin $floating_tag + - name: Create new floating tag (Major Version) if: endsWith(env.tag, '.0.0') run: |