Two release channels, keyed to the branch the workflow runs from:
| Branch | Versions | npm dist-tag | Install with |
|---|---|---|---|
main |
0.3.2 |
latest |
yarn add <pkg> |
beta |
0.3.2-beta.0 |
beta |
yarn add <pkg>@beta |
The dist-tag is derived from the version string, so a prerelease can never
take over latest. The bump strategies are pinned to their branch: pre*
runs only from beta, patch/minor/major only from main.
Each published package keeps its own CHANGELOG.md, following
Keep a Changelog. Any PR with a
consumer-visible change adds an entry under that package's ## Unreleased
heading, with the PR number in parentheses. Mark API breaks with a
**Breaking:** prefix.
Beta bumps leave the entries under ## Unreleased. When a cycle graduates to
stable, rename the heading to ## <version> (YYYY-MM-DD) and land that before
running the workflow from main, so the published tarball and the GitHub
release notes agree.
-
Go to "Release Package" in Actions.
-
Click on the "Run workflow" dropdown menu.
-
Pick the branch:
mainfor a stable release,betafor a prerelease. -
Choose the package to release and the version bump type. Following SemVer:
- Patch - Backward-compatible bug fixes.
- Minor - New functionality in a backward-compatible way.
- Major - Breaking API changes.
- Prepatch / preminor / premajor - Open a new beta cycle at the
corresponding bump (
0.3.1+ preminor ->0.4.0-beta.0). - Prerelease - Advance the current beta cycle (
0.4.0-beta.0->0.4.0-beta.1). From a stable version it behaves like prepatch.
-
A maintainer must approve the release before it proceeds.
-
Once approved, the CI will automatically:
- Run tests.
- Bump the version.
- Open a release PR against the branch you ran from, and auto-merge it.
- Create a git tag.
- Publish the package to npm under the channel's dist-tag.
-
Once published, go to "Releases" and create a GitHub release using the generated tag. Mark beta tags as prereleases.
The bump strategies read the version already in package.json, so promote in
this order:
- Merge
betaintomain, carrying the-beta.Nversion with it. - Run "Release Package" from
mainwithpatch,minor, ormajor. Each drops the prerelease suffix:0.4.0-beta.3+ patch ->0.4.0.
Use patch to ship the beta's version as-is. Use minor or major only when
the final release warrants a higher bump than the beta cycle assumed.
A full cycle, starting from 0.3.1 on main:
| Branch | Bump | Version | dist-tag |
|---|---|---|---|
beta |
preminor |
0.4.0-beta.0 |
beta |
beta |
prerelease |
0.4.0-beta.1 |
beta |
beta |
prerelease |
0.4.0-beta.2 |
beta |
main |
patch |
0.4.0 |
latest |
The pre* bump names the version the cycle is heading for, so pick it from
what the finished release will be rather than from the size of the first beta:
prepatch for a bugfix, preminor for new features, premajor for a
breaking change. After that, only prerelease moves the counter. Running
preminor again mid-cycle starts a new one (0.4.0-beta.2 -> 0.5.0-beta.0).
There's a one-step dependency chain across the four published packages:
compact-cli (bin wrapper)
├─ depends on compact-builder
└─ depends on compact-deployer
compact-builder (library)
compact-deployer (library)
compact-simulator (library)
The workspace:^ deps are rewritten by yarn into the resolved versions at
yarn pack time. For the very first release, publish in dependency order so
each dependent finds its deps already on npm:
compact-builder(no internal deps)compact-simulator(no internal deps)compact-deployer(no internal deps)compact-cli(depends oncompact-builderandcompact-deployer; pullmainfirst so both bump commits are present locally before triggering)
After the first release, the four packages version independently — bump any one of them in isolation without re-publishing the others.