diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ed6ae0c675..ab0460df8b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -398,28 +398,37 @@ jobs: # steps below will use and reports every tarball's file list, so a # packing regression fails here, before the first immutable npm # publish. `pnpm pack` does not run `prepublishOnly`, so the - # compiled payloads are built first with the same script CI uses - # (mostly warm after the build-artifacts step above). The + # publishable projects' src tsconfigs are built first — only those: + # the typecheck-everything graph also drags in test tsconfigs, + # whose devDependencies this runner's install does not provide + # (mostly warm after the build-artifacts step above anyway). The # publishable projects are selected by explicit name filters: # unlike recursive publish, recursive pack does not skip private # packages, and packing the private workspace root would walk the # whole repository. run: | set -euo pipefail - pn compile-only verify_dir=$(mktemp -d) pn list --filter=!pnpm --filter=!@pnpm/exe --depth=-1 --json > "$verify_dir/projects.json" filters=() - while IFS= read -r filter; do - filters+=("$filter") + tsconfig_dirs=() + while IFS=$'\t' read -r name dir; do + filters+=("--filter=$name") + if [ -n "$dir" ]; then + tsconfig_dirs+=("$dir") + fi done < <(node -e ' + const { existsSync } = require("node:fs") + const { join } = require("node:path") const projects = JSON.parse(require("node:fs").readFileSync(process.argv[1], "utf8")) for (const project of projects) { if (!project.private && project.name && project.version && project.path) { - console.log(`--filter=${project.name}`) + const dir = existsSync(join(project.path, "tsconfig.json")) ? project.path : "" + console.log(`${project.name}\t${dir}`) } } ' "$verify_dir/projects.json") + pn exec tsgo --build "${tsconfig_dirs[@]}" # Recursive pack runs one project at a time, so pack in four # concurrent chunks; dry-run packing only reads the tree. chunk_size=$(( (${#filters[@]} + 3) / 4 ))