Skip to content

Commit 76dece5

Browse files
authored
ci: trusted publishing
1 parent e9bd838 commit 76dece5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/npm-publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
types:
66
- published
77

8+
permissions:
9+
id-token: write
10+
contents: read
11+
812
jobs:
913
publish:
1014
runs-on: ubuntu-latest
@@ -14,7 +18,8 @@ jobs:
1418
with:
1519
node-version: latest
1620
registry-url: https://registry.npmjs.org/
21+
- name: Update npm
22+
run: npm install -g npm@latest
1723
- run: npm ci
24+
- run: npm run build --if-present
1825
- run: npm publish
19-
env:
20-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)