Skip to content

Commit 8863a58

Browse files
committed
enable trusted publishing
only change: remove node_auth_token, add id-token: write permission
1 parent 1473d4b commit 8863a58

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ on:
2323
- "**"
2424
workflow_dispatch:
2525

26+
permissions:
27+
id-token: write # for publishing to npm
28+
contents: read
29+
2630
jobs:
27-
# Run tests using node, publish a package when tagged
2831
# https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
2932

3033
publish-npm:
31-
runs-on: ubuntu-22.04
34+
runs-on: ubuntu-24.04
3235
steps:
3336
- uses: actions/checkout@v5
3437
- uses: actions/setup-node@v5
@@ -38,11 +41,9 @@ jobs:
3841
- run: npm ci
3942
- run: npm publish
4043
if: startsWith(github.ref, 'refs/tags/')
41-
env:
42-
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
4344

4445
publish-docker:
45-
runs-on: ubuntu-22.04
46+
runs-on: ubuntu-24.04
4647
steps:
4748
- uses: actions/checkout@v5
4849

0 commit comments

Comments
 (0)