Skip to content

Commit 638ce6e

Browse files
committed
Update release workflow to use trusted publishing
1 parent 2d6296a commit 638ce6e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yml

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

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

711
jobs:
812
publish:
913
runs-on: ubuntu-latest
14+
environment: publish
1015
steps:
1116
- uses: actions/checkout@v6
1217
- uses: actions/setup-node@v6
1318
with:
1419
node-version: 'lts/*'
1520
registry-url: 'https://registry.npmjs.org'
21+
package-manager-cache: false
1622
- run: npm ci
1723
- name: npm publish
1824
run: npm publish --workspaces --provenance --access public
19-
env:
20-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2125
- name: postpublish
2226
run: npm run dist:postpublish
2327
- uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)