Skip to content

Commit 9d8524d

Browse files
committed
feat: update workflow for publishing package
1 parent 4e54b4b commit 9d8524d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333

3434
permissions:
3535
contents: read
36+
id-token: write
3637

3738
steps:
3839
- name: Checkout code
@@ -41,9 +42,8 @@ jobs:
4142
- name: Set up Node.js
4243
uses: actions/setup-node@v4
4344
with:
44-
node-version: 18
45+
node-version: 22.x
4546
registry-url: https://registry.npmjs.org/
46-
always-auth: true
4747

4848
- name: Install dependencies
4949
run: npm ci
@@ -57,9 +57,8 @@ jobs:
5757
- name: Publish to npm
5858
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
5959
env:
60-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
61-
NPM_CONFIG_PROVENANCE: false
62-
run: npm publish --access public
60+
NPM_CONFIG_PROVENANCE: true
61+
run: npm publish --access public --provenance
6362

6463
create_release:
6564
name: Create GitHub Release

0 commit comments

Comments
 (0)