Skip to content

Commit 87d7a77

Browse files
committed
Use latest npm versino for publish step
1 parent 62bc73d commit 87d7a77

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,6 @@ jobs:
6565
- run: npm ci
6666
- run: node scripts/update-version.js # ensure the version in version.ts is updated
6767
- run: npm run build
68-
- run: npm publish # no token needed, using OIDC instead
68+
- run: npm install -g npm@latest # Upgrade to npm >= 11.5.1 for OIDC trusted publishing
69+
- run: npm --version # Verify npm version
70+
- run: npm publish --access public # OIDC authentication happens automatically

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ permissions:
1717
contents: read
1818

1919
jobs:
20+
test-npm:
21+
environment: npm
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v5
25+
- uses: actions/setup-node@v5
26+
with:
27+
node-version: 20
28+
registry-url: https://registry.npmjs.org/
29+
cache: 'npm'
30+
- run: npm ci
31+
- run: npm --version # Verify npm version
32+
- run: npm install -g npm@latest # Upgrade to npm >= 11.5.1 for OIDC trusted publishing
33+
- run: npm --version # Verify npm version
34+
2035
browser-tests:
2136
name: Browser Tests (Node ${{ matrix.node }})
2237
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)