Skip to content

Commit 3b164a8

Browse files
Update publishing workflow (#239)
1 parent 22fedea commit 3b164a8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/npm-publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
description: 'Version accepted by `npm version *`'
1616
required: true
1717

18+
permissions:
19+
contents: write
20+
id-token: write
21+
1822
jobs:
1923
NPM:
2024
runs-on: ubuntu-latest
@@ -23,17 +27,14 @@ jobs:
2327
- uses: actions/setup-node@v6
2428
with:
2529
node-version-file: package.json
26-
registry-url: https://registry.npmjs.org
2730
- run: npm ci || npm install
2831
- uses: fregante/setup-git-user@v2
2932
- name: Create version
3033
# Get the generated version, this enables support for keywords: `npm version patch`
3134
run: |
3235
VERSION="$(npm version "${{ github.event.inputs.Version }}")"
3336
echo "VERSION=$VERSION" >> $GITHUB_ENV
34-
- run: npm publish
35-
env:
36-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37+
- run: npm publish --provenance --access public
3738
- run: git push --follow-tags
3839
- run: gh release create "$VERSION" --generate-notes
3940
env:

0 commit comments

Comments
 (0)