Skip to content

Commit 12d072d

Browse files
chore: update workflow file to use npm trusted publishing
1 parent bd29a21 commit 12d072d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
- '**'
1414
tags-ignore:
1515
- '**'
16+
17+
permissions:
18+
contents: read
19+
1620
jobs:
1721
test:
1822
strategy:
@@ -38,6 +42,11 @@ jobs:
3842
build:
3943
needs: test
4044
runs-on: ubuntu-latest
45+
permissions:
46+
contents: write # to be able to publish a GitHub release
47+
issues: write # to be able to comment on released issues
48+
pull-requests: write # to be able to comment on released pull requests
49+
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
4150
steps:
4251
- name: Checkout
4352
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
@@ -73,7 +82,6 @@ jobs:
7382
npm run docs:deploy
7483
env:
7584
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7785

7886
# publish pre-release if non master branch and allowed by .releaserc.yml configuration (only for non-PR branches)
7987
- name: release non-master version

0 commit comments

Comments
 (0)