Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions .github/workflows/automated-main-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."

10 changes: 10 additions & 0 deletions .github/workflows/tool-create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
Loading