fix: stop leaking staged npm package files into GitHub Releases#535
Merged
Conversation
The `release` job downloads every prior-job artifact with `merge-multiple: true`, which flattens the five `platform-package-*` artifacts produced by `stage-platform-packages` into `artifacts/`. Because each of those artifacts contains a `package.json` and a `THIRD-PARTY-LICENSES.md`, those files land alongside the binaries and get uploaded to the GitHub Release as `package.json` and `THIRD-PARTY-LICENSES.md` (one each, last-write-wins). publish-npm.yml does not consume those Release assets — it regenerates `package.json` / `THIRD-PARTY-LICENSES.md` locally per matrix entry, and only pulls the named binary via `gh release download --pattern $ARTIFACT`. So scoping the upload to just the binaries and `.deb` packages is safe.
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
GitHub Releases (v2.0.0, v2.1.0, …) carry two stray assets —
package.jsonandTHIRD-PARTY-LICENSES.md— alongside the actual binaries and.debpackages.Root cause
The
releasejob downloads every prior-job artifact withmerge-multiple: true. The fiveplatform-package-*artifacts produced bystage-platform-packageseach contain apackage.json+bin/vibe-*+THIRD-PARTY-LICENSES.md;merge-multipleflattens them into a singleartifacts/directory, soartifacts/package.jsonandartifacts/THIRD-PARTY-LICENSES.mdget last-write-wins-overwritten by the five matrix variants and then uploaded bysoftprops/action-gh-releaseviafiles: artifacts/*.Why this is safe to drop
publish-npm.ymldoes not consume those Release assets:package.jsonandTHIRD-PARTY-LICENSES.mdper-matrix-entry from the checked-out source viascripts/stage-platform-package.ts+scripts/generate-third-party-licenses.ts.gh release download --pattern \"\$ARTIFACT\".Homebrew, the
.debpackages, and direct binary downloads also don't reference those assets.Change
Replace
files: artifacts/*with an explicit list:(
.debfiles are namedvibe_<version>_<arch>.deb— underscore separators — so the second glob is intentionally different from the first.)Test plan
gh release view <tag> --json assets --jq '.assets[].name'should list only the five binaries + the two.debfiles (nopackage.json, noTHIRD-PARTY-LICENSES.md)