Skip to content

Stage releases on npm instead of publishing them (0.1.3) - #6

Merged
JSv4 merged 1 commit into
mainfrom
stage-publish
Nov 26, 2026
Merged

JSv4 merged 1 commit into
mainfrom
stage-publish

Conversation

@JSv4

@JSv4 JSv4 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

What changes

  • .github/workflows/publish.yml runs npm stage publish instead of npm publish. A staged version is not installable until a maintainer approves it on npmjs.com (Staged Packages) or with npm stage approve, both of which ask for their second factor.
  • The optional NPM_TOKEN path is removed. The workflow authenticates only as the package's trusted publisher (OIDC), and that publisher allows npm stage publish only, so nothing in this repository can put a version on npm by itself.
  • Version 0.1.3. The v0.1.2 release ran the old workflow, whose npm publish the stage-only trusted publisher refused (403 OIDC permission denied for this action), so 0.1.2 is not on npm. 0.1.3 has the same library code as 0.1.2.
  • README: the releasing note describes the staging step.

After merging

Publish a GitHub release v0.1.3, then approve the staged version on npmjs.com.

The release workflow now runs `npm stage publish` as the package's trusted
publisher and holds no npm token. A staged version becomes installable only
when a maintainer approves it on npm with their second factor.

Version 0.1.3: the v0.1.2 tag carries the workflow that ran `npm publish`,
which the stage-only trusted publisher refuses, so 0.1.2 never reached npm.
@JSv4
JSv4 merged commit 5efc4ea into main Nov 26, 2026
6 checks passed
@JSv4
JSv4 deleted the stage-publish branch November 26, 2026 01:27
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