Skip to content

Commit 9d7e39f

Browse files
committed
update to trusted publishing
1 parent 1bf9691 commit 9d7e39f

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ on:
77

88
permissions:
99
contents: read
10+
id-token: write
1011

1112
jobs:
1213
publish:
1314
if: ${{ github.event.release.prerelease == false }}
1415
runs-on: ubuntu-latest
15-
env:
16-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1716
steps:
1817
- name: Checkout repository
1918
uses: actions/checkout@v4
@@ -26,13 +25,6 @@ jobs:
2625
node-version: "20"
2726
registry-url: "https://registry.npmjs.org"
2827

29-
- name: Validate npm token
30-
run: |
31-
if [[ -z "$NODE_AUTH_TOKEN" ]]; then
32-
echo "NPM_TOKEN secret is not configured" >&2
33-
exit 1
34-
fi
35-
3628
- name: Install dependencies
3729
run: npm ci
3830

@@ -57,4 +49,4 @@ jobs:
5749
npm version "${{ steps.release_version.outputs.version }}" --no-git-tag-version
5850
5951
- name: Publish to npm
60-
run: npm publish
52+
run: npm publish --access public --provenance

0 commit comments

Comments
 (0)