Release Process — SDK packages
This document covers the operational mechanics of releasing @lithosphere/blockchain-core and @lithosphere/sdk to npm. The companion runbook for emergency / rotation events lives at key-rotation-runbook.md.
When to release
Patch (
0.1.x) — bug fixes only, no API surface changes.Minor (
0.x.0) — additive API changes (new method onLithoClient, new network entry, new exported type). Existing callers must still compile without modification.Major (
x.0.0) — breaking change. Reserve for v1.0.0 and beyond; for v0.x, document breaking changes in CHANGELOG and bump the minor.
@lithosphere/sdk depends on @lithosphere/blockchain-core via workspace:*. On publish, pnpm rewrites this to the exact published version, so both packages must release together at the same version number.
Prerequisites (one-time)
NPM_TOKENsecret must be set in theKaJLabs/Lithosphererepo settings (Settings → Secrets and variables → Actions). The token must have Automation type with publish access to the@lithosphere/*scope.Generate at https://www.npmjs.com/settings//tokens.
Select "Automation" (granular tokens also work if scoped to the org).
The release workflow checks for
NPM_TOKENand emits a non-fatal warning when it's absent (so missing-secret releases don't fail the GitHub release publication — they just skip the npm push).
OIDC / provenance — the workflow uses
--provenancewhich requirespermissions: id-token: write. No additional secret is needed beyondNPM_TOKEN. Provenance attestations show up on the package page as a "verified" badge linking back to the GitHub Actions run.npm org membership — confirm the GitHub Actions automation user is a maintainer of the
@lithospherescope on npm (npm access ls-collaborators @lithosphere/sdk).
Cutting a release
Releases are now driven by release-please parsing conventional commits. The manual git tag flow at the bottom of this section still works, but the automated path is the default.
Automated path (preferred)
Land work on
mainusing conventional-commit messages. The types recognised by.github/release-please-config.jsonare:feat:— minor bump (or patch while pre-1.0 perbump-minor-pre-major).fix:— patch bump.feat!:/ footerBREAKING CHANGE:— major bump.Visible-but-non-bumping sections:
sec,obs,deploy,dx,sdk,perf.Hidden from the changelog:
ci,test,docs,gov,chore,refactor,style,build.
Each push to
mainruns.github/workflows/release-please.yaml, which opens (or updates) a single Release PR namedchore(main): release <next-version>. The PR:Bumps
.github/.release-please-manifest.jsonfrom the current version to the next.Writes/updates
CHANGELOG.mdwith one section per type.
Review the Release PR. If the proposed version or notes look right, merge it. release-please will:
Push a
v<next-version>tag (e.g.v1.28.0).Create a corresponding GitHub Release.
The tag push triggers the existing
Developer Preview Releaseworkflow (.github/workflows/release.yaml) which syncs the SDK package versions, builds, packs, and publishes both packages to npm with provenance.
If the proposed bump is wrong (e.g. release-please saw a
feat:but the change is actually internal), amend or revert the offending commit message onmainand push again — the Release PR will refresh.
Manual path (fallback)
Update
CHANGELOG.mdin both packages with the new version's notes.Verify locally:
Tag and push:
The
Developer Preview Releaseworkflow runs automatically. It:Syncs both packages'
package.jsonversions to the tag.Builds + tests both packages.
Packs tarballs + uploads as a GitHub Release.
Publishes both packages to npm (in order:
blockchain-core, thensdk).
Verify the publish:
Dry run (without publishing)
Use workflow_dispatch to run the release workflow without tagging:
GitHub UI → Actions → Developer Preview Release → Run workflow.
The
publish_npmjob is gated onstartsWith(github.ref, 'refs/tags/v'), so it will be skipped forworkflow_dispatchruns.The
validateandpublish_github_releasejobs still execute against your branch, including the smoke test that installs both tarballs into a scratch project and asserts the canonical exports (LithoClient,NETWORKS,LithoError,ErrorCode) are reachable.
Rolling back
npm unpublish is only allowed within 72 hours of publishing and only if no other public package depends on the version. Prefer to publish a patch:
For genuine emergencies (e.g. a leaked secret in a published tarball), follow the key-rotation runbook for the secret in question and document the incident via the PIR template.
Related
Issue templates:
.github/ISSUE_TEMPLATE/RFC template:
docs/governance/rfc-template.mdSecurity policy:
SECURITY.md
Last updated