To create a new version, run:
./scripts/release.sh patch # Increment PATCH component (e.g., 1.2.3 -> 1.2.4)
./scripts/release.sh minor # Increment MINOR component (e.g., 1.2.3 -> 1.3.0)
./scripts/release.sh major # Increment MAJOR component (e.g., 1.2.3 -> 2.0.0)All packages share a single version, bumped in lockstep by lerna version.
A new prerelease series is started by passing the version explicitly, and
continued with prerelease, which keeps the identifier it already has (the
label between the - and the counter):
./scripts/release.sh 5.8.0-beta.0 # 5.7.1 -> 5.8.0-beta.0
./scripts/release.sh prerelease # 5.8.0-beta.0 -> 5.8.0-beta.1The identifier becomes the npm dist-tag, so a prerelease is installed only by asking for it:
pnpm add @codspeed/vitest-plugin@betalatest keeps pointing at the most recent stable release, and ^5 never
resolves to a prerelease.
-
scripts/release.sh:- Refuses to run outside
mainor with a dirty working tree - Runs
lerna version, which bumps every package, commits, creates a signedvX.Y.Ztag and pushes it
- Refuses to run outside
-
CI release workflow (
.github/workflows/release.yml):- Triggered automatically when the tag is pushed
- Builds the native addon prebuilds for linux-arm and darwin-arm
- Builds the libraries
- Publishes to npm via OIDC trusted publishing, under the dist-tag derived
from the tag's prerelease identifier (
latestfor a plainvX.Y.Ztag) - Creates a draft GitHub release, flagged as a prerelease when the version has a prerelease identifier