ci(publish): handle release-please prefixed tags (wallet-v<semver>)#23
Merged
ci(publish): handle release-please prefixed tags (wallet-v<semver>)#23
Conversation
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.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wallet-v*tags, but the version-strip lineTAG_VERSION=\"\${REF_NAME#v}\"was left untouched. That strip only removes a leadingv, soREF_NAME=wallet-v0.1.9producesTAG_VERSION=wallet-v0.1.9(no-op), the guard compares it againstpackage.json0.1.9, and the publish fails withTag version (wallet-v0.1.9) does not match package.json version (0.1.9).npm install @keeperhub/walletare still pulling 0.1.8.X-vprefix first, then any remaining leadingv. Both legacyv0.1.9and release-pleasewallet-v0.1.9tags now resolve to0.1.9. Pure shell parameter expansion against the existingREF_NAMEenv var — no\${{ }}expansion in the script body, no new untrusted input surface.Repro
wallet-v0.1.9tag, or (b) push an empty commit tomainso release-please cuts awallet-v0.1.10and the publish workflow re-fires.Test plan
REF_NAME=wallet-v0.1.9→TAG_VERSION=0.1.9;REF_NAME=v0.1.9→TAG_VERSION=0.1.9;REF_NAME=v0.1.10→TAG_VERSION=0.1.10. All match the correspondingpackage.jsonversion.