Skip to content

Commit 467361f

Browse files
committed
Switch to NPM trusted publishing
1 parent d8eb27b commit 467361f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
release:
99
types: [ created ]
1010

11+
# See https://docs.npmjs.com/trusted-publishers#step-2-configure-your-cicd-workflow
12+
permissions:
13+
id-token: write
14+
contents: read
15+
1116
jobs:
1217
build:
1318

@@ -47,6 +52,10 @@ jobs:
4752
node-version: 20
4853
registry-url: https://registry.npmjs.org/
4954

55+
# Ensure npm 11.5.1 or later is installed
56+
- name: Update npm
57+
run: npm install -g npm@latest
58+
5059
- name: Install dependencies
5160
run: npm install
5261

@@ -58,5 +67,3 @@ jobs:
5867

5968
- name: Publish release
6069
run: npm publish
61-
env:
62-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)