Skip to content

Commit 1de2ec3

Browse files
committed
Add trusted publishing using OIDC
1 parent ec999b2 commit 1de2ec3

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

.github/workflows/ci-test-publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,22 @@ on:
1111
tags:
1212
- "v*"
1313

14+
permissions:
15+
id-token: write
16+
contents: read
17+
1418
jobs:
1519
build:
1620
runs-on: ubuntu-latest
1721

1822
steps:
19-
- uses: actions/checkout@v4
20-
- name: Setup Node.js
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: 20
23+
- uses: actions/checkout@v5
24+
- uses: volta-cli/action@v4
2425
- run: npm ci
2526
- run: npm run lint
2627
- run: npm run prettier:ci
2728
- run: npm run build
2829
- run: npm run test:ci
2930
- name: npm publish
3031
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '.')
31-
uses: JS-DevTools/npm-publish@v3
32-
with:
33-
token: ${{ secrets.NPM_TOKEN }}
32+
uses: JS-DevTools/npm-publish@v4

package-lock.json

Lines changed: 14 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,9 @@
106106
"LICENSE",
107107
"README.md",
108108
"dist/**/*"
109-
]
109+
],
110+
"volta": {
111+
"node": "24.11.1",
112+
"npm": "11.6.2"
113+
}
110114
}

0 commit comments

Comments
 (0)