Skip to content

Commit 9ad5b38

Browse files
committed
Update for OIDC for publishing to npm
1 parent 170032a commit 9ad5b38

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Use Node.js
4747
uses: actions/setup-node@v4
4848
with:
49-
node-version: '20.x'
49+
node-version: 24
5050

5151
- name: Use Go
5252
uses: actions/setup-go@v5
@@ -122,6 +122,8 @@ jobs:
122122
needs: build
123123
name: package-and-publish
124124
environment: deploy
125+
permissions:
126+
id-token: write
125127
runs-on: ubuntu-latest
126128
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
127129
steps:
@@ -133,7 +135,7 @@ jobs:
133135
- name: Use Node.js
134136
uses: actions/setup-node@v4
135137
with:
136-
node-version: '20.x'
138+
node-version: 24
137139

138140
- name: Print env
139141
run: |
@@ -148,13 +150,9 @@ jobs:
148150
path: dist
149151
merge-multiple: true
150152

151-
- name: Build
153+
- name: Build and Publish
152154
shell: bash
153155
run: |
154156
npm ci
155157
node build/prep-for-publish.js
156-
157-
- name: Publish to NPM 📖
158-
uses: JS-DevTools/npm-publish@v2
159-
with:
160-
token: ${{ secrets.NPM_TOKEN }}
158+
npm publish

0 commit comments

Comments
 (0)