From 3a08eedfec14639117cef26cddce2324ba65066e Mon Sep 17 00:00:00 2001 From: Jakub <106778416+MarekZegare4@users.noreply.github.com> Date: Sun, 24 May 2026 00:50:10 +0200 Subject: [PATCH] fix(ci): fix double-v in version for v* style tags setup-build-environment was using v${TAG#*-v} which prepended an extra "v" when the tag already starts with "v" (e.g. v1.11 -> vv1.11). Now uses the tag name directly for v* tags; strips name-v prefix only for compound tags like room-server-v1.2.3. Remove redundant Extract Version steps from the wio firmware workflow since setup-build-environment already handles this. Co-Authored-By: Claude Sonnet 4.6 --- .github/actions/setup-build-environment/action.yml | 7 +++++-- .github/workflows/build-wio-tracker-l1-firmwares.yml | 6 ------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-build-environment/action.yml b/.github/actions/setup-build-environment/action.yml index 7703c1ef..bc690e58 100644 --- a/.github/actions/setup-build-environment/action.yml +++ b/.github/actions/setup-build-environment/action.yml @@ -23,9 +23,12 @@ runs: # a git tag of "room-server-v1.2.3" should set "v1.2.3" as GIT_TAG_VERSION # a git tag of "wio-tracker-v1.15-plus.1.3" should set "v1.15-plus.1.3" as GIT_TAG_VERSION - # Strip the shortest prefix ending with "-v" so hyphens in the version are preserved. + # a git tag of "v1.11" should set "v1.11" as GIT_TAG_VERSION - name: Extract Version from Git Tag shell: bash run: | GIT_TAG_NAME="${GITHUB_REF#refs/tags/}" - echo "GIT_TAG_VERSION=v${GIT_TAG_NAME#*-v}" >> $GITHUB_ENV + case "$GIT_TAG_NAME" in + v*) echo "GIT_TAG_VERSION=${GIT_TAG_NAME}" >> $GITHUB_ENV ;; + *) echo "GIT_TAG_VERSION=v${GIT_TAG_NAME#*-v}" >> $GITHUB_ENV ;; + esac diff --git a/.github/workflows/build-wio-tracker-l1-firmwares.yml b/.github/workflows/build-wio-tracker-l1-firmwares.yml index 06fe7b07..169a2211 100644 --- a/.github/workflows/build-wio-tracker-l1-firmwares.yml +++ b/.github/workflows/build-wio-tracker-l1-firmwares.yml @@ -21,9 +21,6 @@ jobs: - name: Clone Repo uses: actions/checkout@v4 - - name: Extract Version from Git Tag - run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV - - name: Setup Build Environment uses: ./.github/actions/setup-build-environment @@ -45,9 +42,6 @@ jobs: - name: Clone Repo uses: actions/checkout@v4 - - name: Extract Version from Git Tag - run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV - - name: Setup Build Environment uses: ./.github/actions/setup-build-environment