Skip to content

Commit 77b86cd

Browse files
authored
Update npm.yml to use OIDC NPM publishing
1 parent e32db29 commit 77b86cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/npm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- main
66
tags:
77
- "v*"
8+
permissions:
9+
id-token: write # Required for OIDC NPMJS publishing
10+
contents: read
811

912
jobs:
1013
build:
@@ -50,9 +53,6 @@ jobs:
5053
token: ${{ secrets.GITHUB_TOKEN }}
5154
- name: NPM Publish
5255
if: startsWith(github.ref, 'refs/tags/v')
53-
env:
54-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5556
run: |
5657
npm --no-git-tag-version version "$(git describe --tags --abbrev=0)"
57-
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
5858
npm publish

0 commit comments

Comments
 (0)