fix(ci): make tag version gate shell-safe - #8
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes the GitHub Actions release workflow’s tag ↔ package version gate by rewriting the run: command into a multi-line shell script with safe, non-nested quoting, so tag-based releases reliably stop before publishing when versions don’t match.
Changes:
- Replace the one-liner
testcommand with a two-line script that extractspackage.json’s version intoPACKAGE_VERSION. - Compare
v${PACKAGE_VERSION}to${GITHUB_REF_NAME}using a straightforwardtestto fail the job on mismatch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The first v0.3.1 run stopped safely before publishing because nested shell quotes made the tag/version gate invalid.
This rewrites the gate as a two-line shell check. Verified locally against v0.3.1 and parsed the workflow as YAML.