Two GitHub Actions workflows drive the release process:
rc— automatic: every push todevelopproduces a versioned release candidate.publish— manual: promotes a chosen RC to a stable release and publishes it to npm and JSR.
push to develop ──► rc.yml ──► GitHub prerelease v0.0.0-rc.<run#>
│
Actions → publish.yml (manual dispatch)
│
v0.0.0 stable release + npm + JSR publish
│
auto-bump base to 0.0.1 on develop
Triggered by any push to develop (.github/workflows/rc.yml):
npm ciand build the framework (npm run build --workspace spindlework)- Compute the RC version
BASE-rc.<N>frompackages/package.json—BASEis the current version with any prerelease suffix stripped,<N>is one past the number of existingv<BASE>-rc.*prereleases, so the RC counter resets per version (0.1.0-rc.1,0.1.0-rc.2, …) - Run the test suite — non-blocking: the 9 pre-existing failures (fiber schema, fabric scope IDs) are tracked separately and won't block an RC
npm pack→ attachspindlework-<rc>.tgz- Create a GitHub prerelease tagged
v<rc>(e.g.v0.0.0-rc.5), targeting the pushed commit
The RC version is never committed to develop — the tag and release carry it, while packages/package.json keeps the plain BASE. Each push to develop produces the next BASE-rc.<N>, so existing RCs are never overwritten (a concurrent push could pick the same <N>; re-running the workflow after it resolves is the recovery).
Once an RC looks good, promote it:
- Actions →
publish→ Run workflow rc_version(required): the RC to promote, e.g.0.0.0-rc.5(must match an existingv<rc>tag)final_version(optional): override the release version. Defaults to the RC's base — the version inpackages/package.jsonat the RC commit (e.g.0.0.0).bump(optional): the next-version increment applied todevelopafter a successful publish —patch(default),minor,major, ornone.
What .github/workflows/publish.yml does:
- Check out the RC tag (same code that was RC'd)
- Resolve the final version and set it in both
packages/package.jsonandpackages/jsr.json - Build
- npm publish — publishes
spindlework@<final>aslatestusing theNPM_TOKENrepository secret - JSR publish —
npx jsr publishfrompackages/, authenticating tokenlessly via OIDC (the@isfopo/spindleworkpackage must be linked to this repo on jsr.io) npm pack→ attach the tarball to a stable GitHub releasev<final>(e.g.v0.0.0) at the RC commit- Auto-bump — increments the base version (
patch/minor/majorper thebumpinput,noneskips) inpackages/package.jsonandpackages/jsr.json, and pushes the bump commit todevelop, so the next RC starts from the bumped version
The prerelease stays visible in the Releases Prereleases tab for reference.
packages/package.json(andpackages/jsr.json, kept in sync) is the source of truth for the next release version.- The base version auto-increments after every promotion (patch by default; pick
minor/majorvia thebumpinput) — no manual version edits needed. Version bumps are committed todevelopby the workflow. - Follow semver: patch for fixes, minor for features, major for breaking changes (this repo prefers breaking changes over compatibility shims).
- Example flow with a future
0.1.0:0.1.0is promoted (npm + JSR) from0.1.0-rc.N- the workflow bumps the base to
0.1.1ondevelop - next pushes produce
0.1.1-rc.1,0.1.1-rc.2, … - promoting
0.1.1-rc.2publishes0.1.1and bumps to0.1.2, and so on
| Item | Status |
|---|---|
| Workflows on the default branch | Required — GitHub only runs workflows defined on main; merge after the feature branch lands |
NPM_TOKEN repo secret |
Required — npm publish authenticates with this; add an npm access token (Automation type) under repo Settings → Secrets → Actions |
| JSR package linked for OIDC | Required for jsr publish — create @isfopo/spindlework on jsr.io and link the isfopo/spindlework GitHub repo in its package settings; no JSR token needed |
develop pushable by the workflow |
Required for the auto-bump step — the default GITHUB_TOKEN can push unless develop has branch protection requiring PRs |
| Node 24 on CI | Matches local toolchain |
.github/workflows/rc.yml— RC generation.github/workflows/publish.yml— manual promotion