Skip to content

Commit 58df00a

Browse files
committed
Trusted publishing
1 parent 64f9f1b commit 58df00a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
tags:
77
- 'v*.*.*'
88

9+
permissions:
10+
id-token: write
11+
contents: read
12+
913
jobs:
1014
publish:
1115
runs-on: ubuntu-latest
@@ -16,13 +20,13 @@ jobs:
1620
- name: Setup node
1721
uses: actions/setup-node@v4
1822
with:
19-
node-version: '20'
23+
node-version: '22'
2024
registry-url: https://registry.npmjs.org/
2125

2226
- name: Setup pnpm
2327
uses: pnpm/action-setup@v2
2428
with:
25-
version: 8
29+
version: latest
2630

2731
- name: Install dependencies
2832
run: pnpm install --frozen-lockfile
@@ -31,6 +35,5 @@ jobs:
3135
run: pnpm build
3236

3337
- name: Publish package
34-
env:
35-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3638
run: npm publish --access public
39+
if: startsWith(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)