Skip to content

Commit 504d22d

Browse files
authored
Fix publish to npm
Added permissions for OIDC so npm uses that to publish.
1 parent 0df3ea2 commit 504d22d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/test-and-deplyo.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: test & publish
22
on: push
33

4+
permissions:
5+
id-token: write # Required for OIDC
6+
contents: read
7+
48
jobs:
59
test:
610
runs-on: ubuntu-latest
@@ -43,7 +47,5 @@ jobs:
4347
- run: cp package.json $DIST_FOLDER
4448
- run: cp README.md $DIST_FOLDER
4549
- run: npm install
46-
- name: Authenticate w/NPM.
47-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > .npmrc
4850
- name: Publish the library.
4951
run: npm publish $DIST_FOLDER

0 commit comments

Comments
 (0)