Skip to content

Commit 10b4982

Browse files
author
Dmytro
committed
Fix publish permissions
1 parent 093e7af commit 10b4982

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
# https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow
12
name: Test, Lint, Release and Publish
3+
24
on:
35
push:
46
branches:
57
- main
8+
9+
# https://docs.npmjs.com/trusted-publishers
10+
permissions:
11+
id-token: write # Required for OIDC
12+
contents: read
13+
614
jobs:
715
main:
816
name: Release and publish Node package
@@ -58,8 +66,4 @@ jobs:
5866

5967
- name: Publish new version
6068
if: env.VERSION_CHANGED == 'true'
61-
# Note: Setting NODE_AUTH_TOKEN as job|workspace wide env var won't work
62-
# as it appears actions/setup-node sets own value
63-
env:
64-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6569
run: npm publish --verbose

0 commit comments

Comments
 (0)