Skip to content

Commit f336c0a

Browse files
committed
fix(release): add NPM_TOKEN for first-time package publish
OIDC trusted publishing cannot create new packages on npm registry. Add NODE_AUTH_TOKEN env var to both publish steps to enable first-time publishing of scoped packages.
1 parent e53d281 commit f336c0a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,10 @@ jobs:
258258
echo "OK: $pkg_dir"
259259
done
260260
261-
# OIDC Trusted Publishing - no NPM_TOKEN needed
261+
# NPM_TOKEN required for first-time publish; OIDC provenance for supply chain security
262262
- name: Publish platform packages
263+
env:
264+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
263265
run: |
264266
set -e
265267
for platform in $PLATFORMS; do
@@ -274,6 +276,8 @@ jobs:
274276
sleep 15
275277
276278
- name: Publish main package
279+
env:
280+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
277281
run: npm publish --provenance --access public
278282

279283
# ============================================================================

0 commit comments

Comments
 (0)