ci: guard against publishing a package without dist - #54
Merged
Merged
Conversation
Add a step after pnpm build that packs each of the three npm-published packages (hdrify, cli, hdrify-react) with pnpm pack --dry-run and fails if dist/index.js is missing from the tarball listing. A sibling project shipped a release without dist because its release job published from a checkout that never built dist (bhouston/tanstack-router-ga4#26). hdrify's release workflow already builds before publishing, but there was no regression guard. Closes #53
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
dist/directory because the release job published from a checkout wheredistwas never built (v1.6.1 npm package is missing the dist directory tanstack-router-ga4#26, fixed in test(ci): guard against publishing a package without dist tanstack-router-ga4#27).pnpm buildbeforepnpm release, and the currently published tarballs forhdrify,hdrify-cli, andhdrify-reactwere confirmed to includedist/. But there was no regression guard, so a future change to the build step, a package'sfilesfield, or the release workflow could silently break packaging again.pnpm buildthat runspnpm pack --dry-runfor each of the three npm-published packages and fails ifdist/index.jsis missing from the tarball listing.Validation
pnpm build && pnpm tsc && pnpm lint && pnpm test --coverage && pnpm release:check && pnpm sizeall pass locally.pnpm audit --audit-level=highreviewed; pre-existing advisories only, unrelated to this change.Closes #53