Skip to content

Commit e761956

Browse files
committed
feat: enable npm OIDC trusted publisher with provenance
Add id-token permission and configure registry URL for npm OIDC authentication. Enable NPM_CONFIG_PROVENANCE to generate package attestations linked to this GitHub Actions workflow.
1 parent 0fd077b commit e761956

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/CI-CD.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,15 @@ jobs:
107107
needs:
108108
- node_tests
109109
- browser_tests
110+
permissions:
111+
contents: write
112+
id-token: write
110113
steps:
111114
- uses: actions/checkout@v4
112115
- uses: actions/setup-node@v4
113116
with:
114117
node-version: lts/*
118+
registry-url: https://registry.npmjs.org
115119

116120
- name: Install dependencies
117121
run: yarn install --frozen-lockfile
@@ -124,3 +128,4 @@ jobs:
124128
env:
125129
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126130
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
131+
NPM_CONFIG_PROVENANCE: true

0 commit comments

Comments
 (0)