Repository navigation
Check the release tarball name against the install URL - #23
Merged
Merged
Conversation
release.yml now fails before publishing unless the full tarball carries the exact name and tag that prepare.mjs prints for an "install": "tarball" refusal, and SHA256SUMS lists it. Pre-release tags are checked the same way.
The README and installation guide lead with npm install of the release URL and the SHA256SUMS check, then the git install for contributors or a pinned commit. The git install itself is unchanged.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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
Both install paths stay supported (Q19): the prebuilt release tarball for applications, the git install for contributors.
release.ymlalready builds the package once on everyv*tag push (andvX.Y.Z-rc.N, as a pre-release) and attachesichava-js-icon-components-X.Y.Z.tgz, the per-pack tarballs andSHA256SUMS. v0.1.0's release carries it (7 assets). What was missing was a link between that name andtarballUrl()inscripts/prepare.mjs, which the"install": "tarball"refusal prints: the workflow hard-coded the name separately.scripts/check-release-name.mjsruns inrelease.ymlafter packing and before publishing. It fails unless the release directory holdsbasename(tarballUrl(version))for the tag, the URL points at that tag's download, andSHA256SUMSlists it.tests/release-name.test.ts: final and pre-release tags, a drifted name, a missing checksum line, the script's exit codes, and the workflow step's position between packing and publishing.tests/tarball.test.tsnow asserts the packed name equalstarballUrl()'s.docs/installation.mdlead with the tarball (npm installof the release URL, then theSHA256SUMScheck), then the git install for contributors or a pinned commit.docs/release.mdnames the new check. The git install andprepareare unchanged.[Unreleased], since the v0.1.0 tag is final and this is not in its tree.Verification
npm run lint,npm run typecheck,npm run build,npx vitest run: 30 files, 420 tests pass (Node 26).tarballUrl()failed 4 of 6 tests inrelease-name.test.tsand made the script exit 1 against a release directory with the real name; replacing the workflow step failed the step-position test. Both reverted.ichava-js-icon-components-0.1.0.tgz: OK.npm run check:config-driftcould not fetch from raw.githubusercontent.com locally (sandbox); no config file changed.