From 80d0c29ead6e320caf57417d008a58bbad3398a6 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 23:30:05 +0000 Subject: [PATCH 1/2] ci: also move minor version tag on release (e.g. v1.1.0 updates v1 and v1.1) Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> --- .github/workflows/release.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76d6496..0415992 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,27 +5,40 @@ on: types: [published] jobs: - tag-major: + tag-aliases: runs-on: ubuntu-latest permissions: contents: write steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Move major version tag + - name: Move major and minor version tags if: ${{ !github.event.release.prerelease }} env: GH_TOKEN: ${{ github.token }} run: | VERSION="${{ github.event.release.tag_name }}" - # Only move the major tag if this is the latest release for the repo + # Only move tags if this is the latest release for the repo LATEST=$(gh release view --repo "${{ github.repository }}" --json tagName -q .tagName) if [ "$LATEST" != "$VERSION" ]; then echo "Skipping: $VERSION is not the latest release (latest is $LATEST)" exit 0 fi - MAJOR="v$(echo "$VERSION" | sed 's/^v//' | cut -d. -f1)" + STRIPPED="$(echo "$VERSION" | sed 's/^v//')" + PARTS="$(echo "$STRIPPED" | tr '.' '\n' | wc -l)" + MAJOR="v$(echo "$STRIPPED" | cut -d. -f1)" + + # Always move the major tag (e.g. v1) + echo "Updating major tag: $MAJOR" git tag -f "$MAJOR" git push origin "refs/tags/$MAJOR" --force + + # Move the minor tag only if version has 3+ parts (e.g. v1.1.0 → v1.1) + if [ "$PARTS" -ge 3 ]; then + MINOR="v$(echo "$STRIPPED" | cut -d. -f1).$(echo "$STRIPPED" | cut -d. -f2)" + echo "Updating minor tag: $MINOR" + git tag -f "$MINOR" + git push origin "refs/tags/$MINOR" --force + fi From 55329440dca2f7e4f5debb4e4f6da6d9a0b281ab Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 23:31:21 +0000 Subject: [PATCH 2/2] fix: use bash parameter expansion instead of sed to satisfy shellcheck Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0415992..90051d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: exit 0 fi - STRIPPED="$(echo "$VERSION" | sed 's/^v//')" + STRIPPED="${VERSION#v}" PARTS="$(echo "$STRIPPED" | tr '.' '\n' | wc -l)" MAJOR="v$(echo "$STRIPPED" | cut -d. -f1)"