Skip to content

Commit 919e412

Browse files
committed
chore: Setup trusted publishing for NPM
1 parent afb905a commit 919e412

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ name: Publish Package to npmjs and JSR
22
on:
33
release:
44
types: [created]
5+
permissions:
6+
id-token: write # Required for OIDC
7+
contents: read
58
jobs:
6-
build:
9+
publish:
710
runs-on: ubuntu-latest
8-
permissions:
9-
contents: read
10-
id-token: write
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
1414
with:
1515
node-version: '22.x'
1616
registry-url: 'https://registry.npmjs.org'
17+
# Ensure npm 11.5.1 or later is installed
18+
- name: Update npm
19+
run: npm install -g npm@latest
1720
- run: corepack enable yarn
1821
- run: yarn
1922
- run: npm publish
2023
- run: npx jsr publish
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
23-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)