Skip to content

Commit eb3e9bb

Browse files
committed
ci: Update release workflow for npm OIDC authentication
1 parent 4b6302f commit eb3e9bb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,19 @@ jobs:
239239
runs-on: ubuntu-latest
240240
needs:
241241
- create-release-branch
242+
243+
# OIDC permissions for npm trusted publishing
244+
permissions:
245+
id-token: write
246+
contents: read
247+
242248
env:
243249
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
244250
GIT_AUTHOR_NAME: mparticle-automation
245251
GIT_AUTHOR_EMAIL: [email protected]
246252
GIT_COMMITTER_NAME: mparticle-automation
247253
GIT_COMMITTER_EMAIL: [email protected]
248-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
254+
# NPM_TOKEN no longer required - using OIDC trusted publishing
249255

250256
steps:
251257
- name: Checkout public master branch
@@ -270,6 +276,7 @@ jobs:
270276
uses: actions/setup-node@v3
271277
with:
272278
node-version: latest
279+
registry-url: 'https://registry.npmjs.org'
273280

274281
- name: Install dependencies
275282
run: npm ci
@@ -279,7 +286,7 @@ jobs:
279286
run: |
280287
npx semantic-release --dry-run
281288
282-
# NPM Publish happens here
289+
# NPM Publish happens here via OIDC trusted publishing
283290
- name: Release
284291
if: ${{ github.event.inputs.dryRun == 'false'}}
285292
run: |

0 commit comments

Comments
 (0)