From a7f2a38d326a9ae5b62bc60452ab69ea3aee41bb Mon Sep 17 00:00:00 2001 From: Enno Schnackenberg <41478036+Intubun@users.noreply.github.com> Date: Wed, 10 Jun 2026 11:40:15 +0200 Subject: [PATCH] Accept release tags without v prefix in the WASM npm publish gate. The AppImage release workflows trigger on any tag (the project tags releases as e.g. 8.3.662, without a v prefix), but the npm publish gate in main-wasm.yml required a v-prefixed tag, so a normal release tag built the AppImages but never published the npm package to GitHub Packages. The gate now accepts both forms, so a single tag releases everything. --- .github/workflows/main-wasm.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main-wasm.yml b/.github/workflows/main-wasm.yml index 8d2aa811..fb56fd53 100644 --- a/.github/workflows/main-wasm.yml +++ b/.github/workflows/main-wasm.yml @@ -2,15 +2,15 @@ name: CI-wasm # Builds the Magic WebAssembly target (both the non-TCL and TCL variants) # on every push and pull request as a CI check. **Publishing** only happens -# when a release tag of the form v... is pushed — that gate is the -# manual release trigger: +# when a release tag of the form ... (optionally v-prefixed) is +# pushed — the same tag that triggers the AppImage release workflows: # # # bump magic/VERSION, commit, push to default branch -# git tag v8.3.638 -# git push origin v8.3.638 +# git tag 8.3.638 +# git push origin 8.3.638 # -# The tag name (minus the leading "v") provides the base; the workflow appends -# the commit date and short SHA: v8.3.799 → 8.3.799020261231+git01234cde. +# The tag name (minus any leading "v") provides the base; the workflow appends +# the commit date and short SHA: 8.3.799 → 8.3.799020261231+git01234cde. # Forks publish under their own namespace via the @/ scope. on: @@ -162,11 +162,12 @@ jobs: done # The release gate. We publish a new npm version only when a tag of the - # shape v... is pushed. + # shape ... (optionally v-prefixed) is pushed, matching the + # AppImage release workflows so one tag releases everything. # # Version scheme (per dmiles' recommendation): # {MAJOR}.{MINOR}.{PATCH}0{YYYYMMDD}+git{SHORT_SHA} - # e.g. v8.3.799 pushed on 2026-12-31 → 8.3.799020261231+git01234cde + # e.g. 8.3.799 pushed on 2026-12-31 → 8.3.799020261231+git01234cde # # The leading zero between PATCH and date keeps the number readable and # ensures correct numeric ordering: 799020261231 < 800020261231. @@ -180,7 +181,7 @@ jobs: date=$(git show -s --format=%cs | tr -d '-') hash=$(git show -s --format=%h) if [ "${{ github.event_name }}" = "push" ] && \ - echo "${{ github.ref }}" | grep -Eq '^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+'; then + echo "${{ github.ref }}" | grep -Eq '^refs/tags/v?[0-9]+\.[0-9]+\.[0-9]+'; then tag="${GITHUB_REF#refs/tags/}" base="${tag#v}" echo "publish=true" >> "$GITHUB_OUTPUT"