Skip to content

Commit 6f4af9f

Browse files
committed
Update publish process to use npms trusted publishing process instead of npm token.
1 parent 7adb5d5 commit 6f4af9f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
id-token: write
10+
711
jobs:
812
publish:
913
runs-on: ubuntu-latest
1014

11-
permissions:
12-
contents: read
13-
id-token: write
14-
1515
steps:
1616
- uses: actions/checkout@v4
1717

@@ -22,6 +22,10 @@ jobs:
2222
registry-url: 'https://registry.npmjs.org'
2323
cache: 'npm'
2424

25+
# Ensure npm 11.5.1 or later is installed
26+
- name: Update npm
27+
run: npm install -g npm@latest
28+
2529
- name: Install dependencies
2630
run: npm ci
2731

@@ -33,5 +37,3 @@ jobs:
3337

3438
- name: Publish to NPM
3539
run: npm publish --provenance --access public
36-
env:
37-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)