You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci(release): nominate a ref + guarded publish-only recovery mode
Adds two workflow_dispatch inputs to the release workflow:
- `ref` (default `master`): branch/tag/commit to build & publish from, so a
specific already-versioned release can be back-published.
- `publish_only` (default false): skips the Phase 1 version step and runs only
Phase 2 (`lerna publish from-package`).
The version step is guarded to run only for a real master release (non-master/
detached refs would fail `lerna version --allow-branch master` anyway). Phase 2
is inherently idempotent — it publishes only tree versions not already on the
registry — so re-running with publish_only=true safely ships whatever a failed
run left behind, without touching git history.
Also adds a pre-publish guard: `from-package` trusts package.json blindly, so a
mis-nominated `ref` could ship drifted source under an already-versioned number.
The guard asserts every publishable package's current version has a matching
`<name>@<version>` tag and its src+manifest at HEAD is byte-identical to that
tag, aborting otherwise. No-op for a normal release, since Phase 1 creates those
tags at HEAD.
Note documented inline: back-publishing an OLD ref still requires that ref's own
@lerna-lite to be publish-capable (>=4 for the tar-7 line); refs predating that
bump crash exactly as they originally did.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments