Skip to content

Commit 9d4847b

Browse files
authored
ci: Connect to NPM using OIDC instead of a token for release workflow (#1962)
**Related Ticket:** #1961 ### Description of Changes - Replace npm token authentication with OIDC-based authentication Prerequisite done: - Added this repo as a trusted publisher for @teamimpact/veda-ui npm package <img width="796" height="405" alt="image" src="https://github.com/user-attachments/assets/e9581f8c-a8ea-47c5-a870-76d6fd03a100" /> ### Validation / Testing Not sure how to test this..? ### Post merge - [ ] Disallow token based publishing access for @teamimpact/veda-ui npm package (switch to the second one in the image) <img width="680" height="127" alt="image" src="https://github.com/user-attachments/assets/9fe13bb5-205c-40cc-b783-a8f904e367cc" /> - [ ] Remove `NPM_TOKEN` from GitHub env vars
2 parents 774d086 + 1229dff commit 9d4847b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
# Sets the GITHUB_TOKEN permissions to allow release
99
permissions:
1010
contents: write
11+
id-token: write # Required for OIDC connection with NPM
1112

1213
# This action requires a GitHub app with content write access installed
1314
# to bypass the main branch protection rule and dispatch the event to a different repo
@@ -91,8 +92,6 @@ jobs:
9192
run: |
9293
yarn buildlib
9394
npm publish
94-
env:
95-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9695
- name: Repository Dispatch
9796
uses: peter-evans/repository-dispatch@v3
9897
with:

0 commit comments

Comments
 (0)