fix(ci): publish packages in dependency order, fail fast on failure#3549
Conversation
Replace `changeset publish` (which publishes in arbitrary order and keeps going when one package fails) with an explicit pipeline in release.mts that: - publishes packages in topological (dependency) order - skips a package's dependents when it fails, so a broken dependency can never produce a broken dependent published against a version that isn't on npm - derives each npm dist-tag from the version itself (x.y.z -> latest, a prerelease -> its own tag), so a prerelease can never overwrite latest - adds a --dry-run flag that prints the publish plan without publishing - exits non-zero when any package fails Adds unit tests (scripts/release.spec.mts) for the pure pipeline helpers and wires them into the tests workflow, since scripts/ isn't a workspace and turbo run test doesn't cover it.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
pnpm publish has no implicit provenance; the NPM_CONFIG_PROVENANCE env var carried over from the changeset publish path is replaced with the documented --provenance flag so each package is published with provenance attestation.
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: This PR replaces the entire changeset publish pipeline with a custom publish orchestrator in scripts/release.mts, which is a critical path for production releases — any bug could result in incorrect package ordering, broken dependency chains on npm, or improper dist-tags, so it requires...
Re-trigger cubic
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR rewrites the CI release pipeline to publish packages in dependency order instead of using changeset publish, which is a critical infrastructure change where any undetected bug could cause broken releases, incorrect dist-tags, or partial publishes, so it requires a human to verify the logic.
Re-trigger cubic
The old "release" script (turbo build) is renamed to "release:build" and now runs as the build step inside release.mts. "release" itself now runs the full pipeline, and "release:dry-run" runs the offline plan-printing mode locally. The release workflow uses the new "pnpm release" shorthand.
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Requires human review: This PR replaces the core publishing pipeline with a custom script that controls package ordering, dist-tag assignment, and failure handling — a significant change to the release process with potential to break production deployments if any edge case is missed, so it requires human review...
Re-trigger cubic
Replace
changeset publish(which publishes in arbitrary order and keeps going when one package fails) with an explicit pipeline in release.mts that:precontrolsAdds unit tests (scripts/release.spec.mts) for the pure pipeline helpers and wires them into the tests workflow, since scripts/ isn't a workspace and turbo run test doesn't cover it.
Closes #3045
Run examples:

Summary by cubic
Publishes packages in dependency order and fails fast to avoid releasing broken dependents. Adds version-based npm dist-tags,
--dry-run, provenance on publish, and exposes the release aspnpm releasewith CI coverage.New Features
changeset publishwith an explicit pipeline inscripts/release.mtsthat publishes in topological order, skips dependents on failure, derives the dist-tag from the version (x.y.z->latest, prereleases -> their own tag), supports--dry-run, and exits non-zero on any failure.pnpm publish --provenance.pnpm release; addrelease:dry-runandrelease:build; update the release workflow to runpnpm release; runscripts/release.spec.mtsexplicitly in CI.Bug Fixes
Written for commit 358be20. Summary will update on new commits.
Review in cubic