2.5 KiB
Prose CLI Release Process
This document is for maintainers publishing @openprose/prose-cli and the
matching GitHub Release tarballs.
The CLI is released from main with the manual CLI Publish GitHub Actions
workflow. The workflow uses npm trusted publishing, so maintainers should not
create or store an npm automation token for routine releases.
Before Releasing
- Confirm the CLI checks are green on
main. - Choose a new npm version. npm package versions are immutable, so never reuse a version that already exists on npm.
- Open a small release-prep pull request that updates:
cli/package.jsoncli/package-lock.jsoncli/install.shDEFAULT_VERSION
- Merge the release-prep pull request after CI passes.
Dry Run
Run the CLI Publish workflow manually from main with:
version: the exact version incli/package.jsonnpm_tag:latestfor stable releases, ornextfor prereleasesdry_run:true
The dry run validates the package, runs tests, builds release tarballs, verifies
their checksums, and runs npm publish --dry-run. It does not create a tag,
GitHub Release, or npm publication.
Publish
After the dry run passes, run the same CLI Publish workflow again from main
with:
version: the exact version incli/package.jsonnpm_tag: the intended npm dist-tagdry_run:false
The publish job targets the protected release environment. A maintainer with
permission to approve that environment must approve the workflow before the
final publish job can proceed.
When approved, the workflow:
- Verifies the package and release tarballs.
- Creates a draft GitHub Release for
v<version>. - Publishes
@openprose/prose-clito npm with provenance. - Publishes the GitHub Release with tarball assets and checksums.
If npm publishing fails after the draft GitHub Release is created, the workflow attempts to delete the draft release and tag.
Verification
After publishing, verify the public install paths:
npm view @openprose/prose-cli@latest version
tmpdir="$(mktemp -d)"
npm install --global --prefix "$tmpdir/npm-global" @openprose/prose-cli
"$tmpdir/npm-global/bin/prose" --version
For the tarball installer, use a temporary install location too:
tmpdir="$(mktemp -d)"
PROSE_INSTALL_DIR="$tmpdir/install" \
PROSE_BIN_DIR="$tmpdir/bin" \
sh -c "$(curl -fsSL https://raw.githubusercontent.com/openprose/prose/main/cli/install.sh)"
"$tmpdir/bin/prose" --version
Check that the GitHub Release for v<version> exists and includes all expected
tarball and .sha256 assets.