From f541882ce75a855779c46509ac6c7a802dfeca3b Mon Sep 17 00:00:00 2001 From: Ben Houston Date: Thu, 24 Sep 2026 13:41:08 -0400 Subject: [PATCH] ci: guard against publishing a package without dist 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 --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 591d426..2612c5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,14 @@ jobs: cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm build + - name: Verify published packages include dist + run: | + for pkg in packages/hdrify packages/cli packages/hdrify-react; do + (cd "$pkg" && pnpm pack --dry-run) | grep -qx 'dist/index.js' || { + echo "::error::dist/index.js missing from the packed tarball for $pkg; the publish step would ship a broken package." + exit 1 + } + done - run: pnpm tsc - run: pnpm lint - run: pnpm test --coverage