Skip to content

Commit f58c2c3

Browse files
authored
ci(release): publish to npm through OIDC trusted publishing only (#54)
Drop the actions/setup-node step from the publish job. It only wrote an .npmrc that reads NODE_AUTH_TOKEN, which nothing sets, so npm saw a placeholder token next to the OIDC exchange. npm now authenticates with id-token: write and each package's trusted publisher alone, and a package without one fails instead of falling back to a token.
1 parent 31e131f commit f58c2c3

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎.github/workflows/release-please.yml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,12 @@ jobs:
109109
- uses: jdx/mise-action@2d8d4cafcbd33be2ea37d2b6f5ad595363d1f1ca # v5.1.1
110110

111111
# npm CLI is the publisher: bun publish supports neither npm OIDC
112-
# trusted publishing nor --provenance (oven-sh/bun#22423). setup-node
113-
# only provisions the registry .npmrc here (no node-version: it uses the
114-
# mise-installed node on PATH); id-token: write + a trusted publisher
115-
# configured on npmjs.com let npm authenticate tokenlessly via OIDC.
116-
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
117-
with:
118-
registry-url: https://registry.npmjs.org
112+
# trusted publishing nor --provenance (oven-sh/bun#22423). Publishing
113+
# authenticates through OIDC only: id-token: write plus a trusted
114+
# publisher configured on npmjs.com for each package. No .npmrc auth
115+
# token is provisioned (no setup-node registry-url / NODE_AUTH_TOKEN), so
116+
# a package without a trusted publisher fails to publish rather than
117+
# falling back to a token.
119118

120119
# OIDC trusted publishing requires npm >= 11.5.1; pin to the latest 11.x
121120
# in case the runner's bundled npm predates it.

0 commit comments

Comments
 (0)