Skip to content

Commit e2a740f

Browse files
ci: move to oidc based trusted publishing with npm
NPM now strongly recommends the use of https://docs.npmjs.com/trusted-publishers instead of tokens. Hence this migrates to that. See also changesets/action#542 related to this for further information on changesets specific setup required. Signed-off-by: MTRNord <[email protected]>
1 parent 47e61de commit e2a740f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
timeout-minutes: 15
1414
outputs:
1515
example-widget-mui-image-tag: ${{ steps.meta_example-widget-mui.outputs.version }}
16+
permissions:
17+
# Used for trusted publishing to npm via OIDC
18+
id-token: write
19+
# Default token permissions
20+
contents: read
21+
packages: read
1622
steps:
1723
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1824
with:
@@ -103,7 +109,8 @@ jobs:
103109
publish: yarn release
104110
env:
105111
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
106-
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
112+
# Use OIDC for npm authentication instead of NPM_TOKEN
113+
NPM_TOKEN: '' # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
107114
helm-lint-test:
108115
runs-on: ubuntu-latest
109116
needs: build

0 commit comments

Comments
 (0)