Skip to content

Commit c303aa0

Browse files
authored
Merge pull request #610 from minrk/trusted-publisher
enable trusted publishing
2 parents df5a262 + 6c39d3e commit c303aa0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,29 @@ 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
3538
with:
36-
node-version: "20"
39+
node-version: "22"
3740
registry-url: https://registry.npmjs.org/
41+
- name: make sure npm is up-to-date
42+
run: npm install --global npm@latest
3843
- run: npm ci
3944
- run: npm publish
4045
if: startsWith(github.ref, 'refs/tags/')
41-
env:
42-
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
4346

4447
publish-docker:
45-
runs-on: ubuntu-22.04
48+
runs-on: ubuntu-24.04
4649
steps:
4750
- uses: actions/checkout@v5
4851

0 commit comments

Comments
 (0)