Skip to content

Commit 4b6e9d9

Browse files
committed
Switch to NPM trusted publishing
1 parent da318be commit 4b6e9d9

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

@@ -43,6 +48,10 @@ jobs:
4348
node-version: 20
4449
registry-url: https://registry.npmjs.org/
4550

51+
# Ensure npm 11.5.1 or later is installed
52+
- name: Update npm
53+
run: npm install -g npm@latest
54+
4655
- name: Install dependencies
4756
run: npm install
4857

@@ -51,5 +60,3 @@ jobs:
5160

5261
- name: Publish release
5362
run: npm publish
54-
env:
55-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)