Skip to content

Commit a263e92

Browse files
committed
use OIDC for publish
1 parent cf54c72 commit a263e92

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Publish
22

33
on:
44
push:
5-
branches: ['main']
5+
branches: ["main"]
6+
7+
permissions:
8+
id-token: write # Required for OIDC
9+
contents: read
610

711
jobs:
812
build:
@@ -24,8 +28,8 @@ jobs:
2428
uses: actions/setup-node@v3
2529
with:
2630
node-version: 22
27-
cache: 'pnpm'
28-
registry-url: 'https://registry.npmjs.org'
31+
cache: "pnpm"
32+
registry-url: "https://registry.npmjs.org"
2933

3034
- name: Install dependencies
3135
run: pnpm install
@@ -41,5 +45,3 @@ jobs:
4145

4246
- name: Publish Package
4347
run: npm publish --tolerate-republish --no-fund
44-
env:
45-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)