Skip to content

Commit 2d3b34a

Browse files
committed
ci: use OIDC for publishing
1 parent db549f2 commit 2d3b34a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/nodejs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
contents: write # to be able to publish a GitHub release
144144
issues: write # to be able to comment on released issues
145145
pull-requests: write # to be able to comment on released pull requests
146-
id-token: write # to enable use of OIDC for npm provenance
146+
id-token: write # to enable use of OIDC for npm provenance and publishing
147147

148148
if:
149149
# prettier-ignore
@@ -160,9 +160,14 @@ jobs:
160160
with:
161161
node-version: lts/*
162162
cache: yarn
163+
164+
# todo: this can be removed once we are using a version of Node that
165+
# ships with npm v11.5.1 or higher, which is needed for using oidc
166+
- name: install latest npm
167+
run: npm i -g npm
168+
163169
- name: install
164170
run: yarn
165171
- run: yarn semantic-release
166172
env:
167173
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
168-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,5 @@
137137
"packageManager": "[email protected]",
138138
"engines": {
139139
"node": "^20.12.0 || ^22.0.0 || >=24.0.0"
140-
},
141-
"publishConfig": {
142-
"provenance": true
143140
}
144141
}

0 commit comments

Comments
 (0)