Skip to content

Commit 59ee357

Browse files
committed
Update GitHub Actions workflow for npm publishing: add permissions for OIDC, upgrade Node.js version to 24.x, and ensure npm is updated to version 11.5.1 or later.
1 parent 98f72f0 commit 59ee357

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Publish Package to npmjs
22
on:
33
release:
44
types: [published]
5+
6+
permissions:
7+
id-token: write # Required for OIDC
8+
contents: read
9+
510
jobs:
611
build:
712
runs-on: ubuntu-latest
@@ -14,9 +19,10 @@ jobs:
1419
# Setup .npmrc file to publish to npm
1520
- uses: actions/setup-node@v4
1621
with:
17-
node-version: '20.x'
22+
node-version: '24.x'
1823
registry-url: 'https://registry.npmjs.org'
1924
- run: bun install --frozen-lockfile
25+
# Ensure npm 11.5.1 or later is installed
26+
- name: Update npm
27+
run: npm install -g npm@latest
2028
- run: npm publish --access public
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)