node-release
Automates versioning and npm publishing with no long-lived secrets and no
guessed facts. The failures this skill fixes: models wire NPM_TOKEN secrets
in 2026, miss that a package's first version can't be published via OIDC, get
the trusted-publisher registration subtly wrong (case, filename, indirection),
and leave releases half-done when publish fails after tagging.
When NOT to use
- Exports maps, bundling, tarball contents →
node-packaging (release assumes
its gates already pass).
- Verifying dependencies' provenance →
node-supply-chain.
- Test/lint CI →
node-ci.
Workflow
- Pick the release tool by workflow reality (decision table in
references/release-playbook.md): Changesets (human-written notes,
monorepos), semantic-release (strict conventional commits, fully
autonomous), release-please (PR-gated review of each release).
- Trusted publishing (OIDC) — the default auth; all requirements are
version-gated in the playbook with the official npm doc links (CLI/Node
minimums on the runner, GitHub-hosted runners, exact repo + workflow-filename
registration match,
workflow_call indirection caveat). Provenance is
attached automatically under trusted publishing.
- Bootstrap gotcha — say it before it bites: a brand-new package cannot be
first-published via OIDC; the playbook's bootstrap procedure covers the one
manual publish, then registration, then token revocation and account-level
trusted-publishing-only enforcement.
- Write the publish workflow from the playbook's YAML: minimal permissions
(
id-token: write, contents: read/write only as needed), SHA-pinned
third-party actions (consistent with node-supply-chain policy), publish
gated on the node-packaging checks.
- Failure-ordering discipline: publish before tagging (or make retries
idempotent); never delete published tags — releases are immutable.
- Verify end-to-end: dry-run, then a real publish of a prerelease/dist-tag
where possible; confirm provenance on the registry page; only then revoke
legacy tokens.
Output spec
A working automated release pipeline: version + changelog + tag + npm publish
with provenance, zero long-lived registry secrets after cutover, bootstrap and
rollback procedures documented in the repo, staged/prerelease channel decided
deliberately.
Gotchas
- Trusted-publisher registration is exact-match: owner/repo casing and workflow
filename including extension; publishing from a reusable (
workflow_call)
workflow validates against the calling file.
- OIDC does not make a compromised workflow safe — it removes stored-secret
theft; workflow-file review still matters (CODEOWNERS on
.github/).
- Tag-then-fail leaves consumers seeing a version npm doesn't have — ordering
or idempotency, pick one explicitly.
- All npm-side specifics (minimums, staged publishing, token lifetimes) drift:
the playbook version-gates each with its primary source — re-verify on setup.
Files
references/release-playbook.md — tool decision table, OIDC setup with
version-gated requirements + doc links, bootstrap procedure, publish workflow
YAML, failure-ordering patterns, dist-tag/prerelease guidance.
1---2name: node-release3description: Cuts and automates npm releases - Changesets, semantic-release or release-please, npm trusted publishing (OIDC) with provenance, the first-publish bootstrap, staged publishing, changelogs and tags. Use when the user asks to release, version, publish to npm, or remove tokens from publish workflows. Not for package exports/bundling artifacts or verifying dependency provenance.4license: MIT5---67# node-release89Automates versioning and npm publishing with **no long-lived secrets and no10guessed facts**. The failures this skill fixes: models wire `NPM_TOKEN` secrets11in 2026, miss that a package's *first* version can't be published via OIDC, get12the trusted-publisher registration subtly wrong (case, filename, indirection),13and leave releases half-done when publish fails after tagging.1415## When NOT to use1617- Exports maps, bundling, tarball contents → `node-packaging` (release assumes18 its gates already pass).19- Verifying *dependencies'* provenance → `node-supply-chain`.20- Test/lint CI → `node-ci`.2122## Workflow23241. **Pick the release tool** by workflow reality (decision table in25 `references/release-playbook.md`): Changesets (human-written notes,26 monorepos), semantic-release (strict conventional commits, fully27 autonomous), release-please (PR-gated review of each release).282. **Trusted publishing (OIDC) — the default auth**; all requirements are29 version-gated in the playbook with the official npm doc links (CLI/Node30 minimums on the runner, GitHub-hosted runners, exact repo + workflow-filename31 registration match, `workflow_call` indirection caveat). Provenance is32 attached automatically under trusted publishing.333. **Bootstrap gotcha — say it before it bites**: a brand-new package cannot be34 first-published via OIDC; the playbook's bootstrap procedure covers the one35 manual publish, then registration, then token revocation and account-level36 trusted-publishing-only enforcement.374. **Write the publish workflow** from the playbook's YAML: minimal permissions38 (`id-token: write`, `contents: read/write` only as needed), SHA-pinned39 third-party actions (consistent with `node-supply-chain` policy), publish40 gated on the `node-packaging` checks.415. **Failure-ordering discipline**: publish before tagging (or make retries42 idempotent); never delete published tags — releases are immutable.436. **Verify end-to-end**: dry-run, then a real publish of a prerelease/dist-tag44 where possible; confirm provenance on the registry page; only then revoke45 legacy tokens.4647## Output spec4849A working automated release pipeline: version + changelog + tag + npm publish50with provenance, zero long-lived registry secrets after cutover, bootstrap and51rollback procedures documented in the repo, staged/prerelease channel decided52deliberately.5354## Gotchas5556- Trusted-publisher registration is exact-match: owner/repo casing and workflow57 filename including extension; publishing from a reusable (`workflow_call`)58 workflow validates against the *calling* file.59- OIDC does not make a compromised workflow safe — it removes stored-secret60 theft; workflow-file review still matters (CODEOWNERS on `.github/`).61- Tag-then-fail leaves consumers seeing a version npm doesn't have — ordering62 or idempotency, pick one explicitly.63- All npm-side specifics (minimums, staged publishing, token lifetimes) drift:64 the playbook version-gates each with its primary source — re-verify on setup.6566## Files6768- `references/release-playbook.md` — tool decision table, OIDC setup with69 version-gated requirements + doc links, bootstrap procedure, publish workflow70 YAML, failure-ordering patterns, dist-tag/prerelease guidance.