Skip to content

Commit 85f26b7

Browse files
committed
Switch to NPM trusted publishing
1 parent bfae0dd commit 85f26b7

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

@@ -44,6 +49,10 @@ jobs:
4449
node-version: 20
4550
registry-url: https://registry.npmjs.org/
4651

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

@@ -55,5 +64,3 @@ jobs:
5564

5665
- name: Publish release
5766
run: npm publish
58-
env:
59-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)