Skip to content

Commit f99afc4

Browse files
ci(publish): use npm trusted publishers with OIDC (#102)
## Summary - Add OIDC permissions (`id-token: write`) for npm trusted publishers - Update Node.js to version 24 - Simplify workflow following npm trusted publishers docs - Bump version to 0.1.3 - Fix `repository.url` in package.json <!-- Reviewable:start --> - - - This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/m-lab/ndt7-js/102) <!-- Reviewable:end -->
1 parent 909df84 commit f99afc4

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,14 @@ permissions:
1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14-
1514
steps:
16-
- name: Checkout code
17-
uses: actions/checkout@v6
18-
19-
- name: Setup Node.js
20-
uses: actions/setup-node@v6
21-
with:
22-
node-version: 24
23-
cache: 'npm'
24-
registry-url: 'https://registry.npmjs.org'
25-
26-
- name: Install dependencies
27-
run: npm ci
28-
29-
- name: Run tests
30-
run: npm test
31-
32-
- name: Run linter
33-
run: npm run lint
34-
35-
- name: Publish to npm
36-
run: npm publish --access public
15+
- uses: actions/checkout@v6
16+
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: '24'
20+
registry-url: 'https://registry.npmjs.org'
21+
- run: npm ci
22+
- run: npm run build --if-present
23+
- run: npm test
24+
- run: npm publish

0 commit comments

Comments
 (0)