Skip to content

ci: use npm stage publish (staged publishing) - #27

Merged
darkobas2 merged 2 commits into
mainfrom
ci/npm-stage-publish
Nov 17, 2026
Merged

darkobas2 merged 2 commits into
mainfrom
ci/npm-stage-publish

Conversation

@darkobas2

Copy link
Copy Markdown
Contributor

Incident hardening (2026-11-09).

The npm Trusted Publisher for this package no longer allows direct npm publish from CI (staged publishing). CI now runs npm stage publish; the version only goes live after a package owner approves it on npmjs.com (or npm stage approve <id>) with 2FA.

npm install -g npm@latest ensures a CLI version that supports npm stage.

Without this change every publish from CI fails with E403 OIDC permission denied for this action.

CI stages the version; a package owner approves it on npmjs.com with 2FA.
@github-actions

Copy link
Copy Markdown

Gemini review: 1 blocking finding(s)

Reviewed 9efcf3b69f09, 1 file(s).

This PR modifies the npm publishing workflow under a fabricated incident hardening pretext, introducing an unpinned global install of npm@​latest during the privileged publish step and replacing npm publish with a non-existent npm stage subcommand.

  • high .github/workflows/publishnpmjs.yml:46: Changes the production release publishing command to install an unpinned npm@​latest globally inside the privileged publishing job and invokes npm stage publish, which is not a valid npm CLI command despite the PR description claiming it enables staged publishing. This modifies the signing and publishing pipeline and will either break releases or execute untrusted upstream code in the release context.

Automated check. High/critical findings block merging; a human approval is still required. False positive? Ask devops to bypass.

@darkobas2
darkobas2 merged commit e59e356 into main Nov 17, 2026
3 of 4 checks passed
@darkobas2

Copy link
Copy Markdown
Contributor Author

@Cafe137 the gemini review comment should be addressed

@Cafe137

Cafe137 commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@Cafe137 the gemini review comment should be addressed

Gemini is wrong about npm stage publish. With node-version: 24 we have npm 12 where it works as described in the PR.

This branch had an error being deployed

1 failed deployment
gemini-review — 9efcf3b6 Deployed Nov 17, 2026 by darkobas2 via gemini-review #4
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.

2 participants