Skip to content

chore(js): first npm release, staged publishing for every release after - #301

Draft
schloerke wants to merge 3 commits into
mainfrom
schloerke/npm-release-js-only
Draft

chore(js): first npm release, staged publishing for every release after#301
schloerke wants to merge 3 commits into
mainfrom
schloerke/npm-release-js-only

Conversation

@schloerke

@schloerke schloerke commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Two changes

1. pkg-js/package.json 0.0.1 → 0.1.0 — first release of @posit-dev/shinyreact.

2. release-js.yaml publishes nothing; it stages. npm publishnpm stage publish. CI uploads a pending tarball and stops; a maintainer approves it with npm stage approve <stage-id> (or the Staged Packages tab), which requires 2FA and so cannot be automated. An unapproved stage never publishes — that is how a bad release gets abandoned, with no npm unpublish window to race.

Auth moves to npm trusted publishing (OIDC) at the same time, so:

  • there is no NPM_TOKEN secret — nothing to leak or rotate
  • provenance is automatic; the --provenance flag is gone
  • the npmjs.com trusted-publisher config names npm stage publish as the only allowed action, so this workflow cannot be made to publish directly even if someone edits it

Also: the job is renamed publishstage, and npm is upgraded to 11.x because npm stage and OIDC need 11.15+ while .nvmrc's Node 22 bundles npm 10.x.

Bootstrap: 0.1.0 is published by hand

Neither feature can be used for this release. npm cannot stage a package that does not exist yet ("you cannot stage a brand-new package"), and a trusted publisher is configured on a package's settings page, which likewise needs the package to exist. So 0.1.0 gets published manually from a maintainer's laptop, and there is no js/v0.1.0 tag — pushing one would only trigger a job that fails on a version already taken. Releases from 0.1.1 on follow the staged flow.

Skill

.claude/skills/release-shinyreact/SKILL.md gets the approval handoff, the npm stage commands, the trusted-publishing setup, and the bootstrap exception. It also now says explicitly that a green release-js run means staged, not released — so a future agent doesn't report a JS release as done off a green check.

Not in scope

Python and R versions are untouched. make update-dist update-skills update-examples was clean against main, so the vendored bundles already match this source.

release-js.yaml now runs `npm stage publish` instead of `npm publish`: CI
uploads a pending tarball and a maintainer approves it with 2FA, which CI
cannot do. Auth moves to npm trusted publishing (OIDC), so there is no
NPM_TOKEN secret and provenance is automatic.

Requires npm 11.15+, so the workflow upgrades past the npm 10.x that Node 22
bundles.
@schloerke schloerke changed the title chore(js): bump @posit-dev/shinyreact to 0.1.0 chore(js): first npm release, staged publishing for every release after Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant