Skip to content

Commit 823d73f

Browse files
committed
chore(dev): use trusted publishing for npm deployments
npm finally rolled out trusted publishing
1 parent e4a3df2 commit 823d73f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

.github/workflows/node-js-packaging.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ jobs:
308308
name: Publish
309309
runs-on: ubuntu-latest
310310
permissions:
311-
contents: read
311+
# needed for trusted publishing
312312
id-token: write
313313
needs:
314314
- build-freebsd
@@ -341,9 +341,4 @@ jobs:
341341
- name: Publish
342342
if: startsWith(github.ref, 'refs/tags/')
343343
working-directory: bindings/node
344-
run: |
345-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
346-
npm publish --access public --provenance true ${{ contains(github.ref_name, '-rc') && '--tag next' || '' }}
347-
env:
348-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
349-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
344+
run: npm publish ${{ contains(github.ref_name, '-rc') && '--tag next' || '' }}

0 commit comments

Comments
 (0)