Commit 2fdd09b
chore: switch npm publish from token to OIDC trusted publishers (#107)
## Summary
- Switches `@onkernel/cli` npm publishing from `NPM_TOKEN` secret to
OIDC trusted publishers
- Based on the approach validated in
[frenchi/test-goreleaser-npm-trusted](https://github.com/frenchi/test-goreleaser-npm-trusted)
## Changes to `.github/workflows/release.yaml`
| Change | Why |
|--------|-----|
| Added `id-token: write` permission | Required for GitHub Actions to
mint an OIDC token for npm |
| Added `npm install -g npm@latest` step | npm >= 11.5.1 is required for
OIDC trusted publishing |
| Removed `NPM_TOKEN` and `NODE_AUTH_TOKEN` env vars from GoReleaser
step | No longer needed — goreleaser's npm pipe picks up the OIDC token
automatically |
## Prerequisites
- GitHub must be configured as a trusted publisher for `@onkernel/cli`
on npmjs.com ([docs](https://docs.npmjs.com/trusted-publishers))
## Test plan
- [ ] Verify the next tag-triggered release publishes `@onkernel/cli` to
npm successfully
- [ ] After confirming, remove the `NPM_TOKEN` secret from the repo
settings
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes release/publishing authentication; failures could block npm
releases if OIDC/npm configuration isn’t correct.
>
> **Overview**
> Switches the release workflow to publish to npm via **OIDC trusted
publishing** instead of an `NPM_TOKEN` secret.
>
> The workflow now grants `id-token: write`, updates npm to a version
that supports OIDC, and removes `NPM_TOKEN`/`NODE_AUTH_TOKEN` from the
GoReleaser environment so publishing relies on the minted OIDC token.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
72531b1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 95a6543 commit 2fdd09b
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | | - | |
45 | | - | |
| |||
0 commit comments