Skip to content

Commit 834817d

Browse files
committed
update npm workflows for trusted publishing
1 parent 9f71ed8 commit 834817d

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/workflows/publish-alpha.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
permissions:
77
contents: read
8-
packages: write
8+
id-token: write
99

1010
jobs:
1111
publish-alpha:
@@ -39,7 +39,4 @@ jobs:
3939
- run: pnpm build
4040

4141
- name: Publish to npm
42-
env:
43-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45-
run: pnpm publish --tag alpha --access public --no-git-checks
42+
run: npm publish --tag alpha --access public --provenance

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
permissions:
77
contents: read
8-
packages: write
8+
id-token: write
99

1010
jobs:
1111
publish-stable:
@@ -42,4 +42,4 @@ jobs:
4242
env:
4343
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4444
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
45-
run: pnpm publish --access public --no-git-checks
45+
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)