Commit 344076b
authored
feat(ci): npm OIDC trusted publishing with provenance (#469)
## Summary
Switch npm publishing from `NPM_TOKEN` to OIDC trusted publishing with
provenance attestations.
### Changes
- Add `id-token: write` permission for OIDC token generation
- Switch `yarn publish` → `npm publish --provenance` (Yarn 1.x doesn't
support provenance)
- `NPM_TOKEN` kept as fallback until trusted publishing is configured
### Setup required on npmjs.com
1. Go to
https://www.npmjs.com/package/@netresearch/node-magento-eqp/access
2. **Trusted Publisher** → **GitHub Actions**
3. Enter:
- Repository: `netresearch/node-magento-eqp`
- Workflow: `release.when-tagged.yml`
- Environment: *(leave blank)*
4. Save
### After setup
Re-run the failed release workflow:
```bash
gh run rerun 22063536695 --repo netresearch/node-magento-eqp
```
The package will publish with a **"Built and signed by GitHub Actions"**
provenance badge on npmjs.com.
## Test plan
- [ ] Configure trusted publisher on npmjs.com
- [ ] Merge this PR
- [ ] Re-run the release workflow or push a new tag
- [ ] Verify provenance badge appears on npm package page2 files changed
+11
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | | - | |
41 | | - | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
52 | | - | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
0 commit comments