From f2704516a2964850b0f6b989d605006c8b104028 Mon Sep 17 00:00:00 2001 From: Simon KP Date: Sat, 2 May 2026 18:02:55 +1000 Subject: [PATCH] ci(publish): handle release-please prefixed tags (wallet-v) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 76be751 widened the publish trigger to fire on wallet-v* tags but left the version strip as TAG_VERSION="${REF_NAME#v}". That only strips a leading 'v', so when REF_NAME=wallet-v0.1.9 the strip is a no-op, TAG_VERSION ends up as the literal 'wallet-v0.1.9', and the guard fails: Tag version (wallet-v0.1.9) does not match package.json version (0.1.9) The workflow run for wallet-v0.1.9 (run id 25205203054) hit this failure 22s after PR #22 merged, so the wallet release for the chain-mismatch + hook-passthrough fixes never made it to npm. Users still pulled 0.1.8. Strip the longest 'X-v' prefix first, then any remaining leading 'v', so both legacy tags (v0.1.9) and release-please component tags (wallet-v0.1.9) extract the right semver. Pure shell parameter expansion with no untrusted input — REF_NAME is the already-validated github.ref_name env var. Re-cutting the v0.1.9 release on top of this fix is a one-liner: re-run the failed Publish workflow on the existing tag, or push an empty commit on top to bump release-please to v0.1.10. --- .github/workflows/publish.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9bb5b54..65a318d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -52,7 +52,15 @@ jobs: env: REF_NAME: ${{ github.ref_name }} run: | - TAG_VERSION="${REF_NAME#v}" + # Accept both legacy 'v' and release-please component + # 'wallet-v' tag formats. The trigger was widened in + # 76be751 to fire on wallet-v* tags but the strip below was + # never updated, so v0.1.9 published cleanly while + # wallet-v0.1.9 failed with a confusing tag-version mismatch. + # Env-only input ($REF_NAME from github.ref_name); no direct + # ${{ }} expansion in the script body. + TAG_VERSION="${REF_NAME##*-v}" + TAG_VERSION="${TAG_VERSION#v}" PKG_VERSION="$(node -p "require('./package.json').version")" if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then echo "Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)" >&2