Skip to content

Commit c7cebb5

Browse files
ci(release): publish to npm with trusted publishing (OIDC) (#130)
The v0.10.0-next.0 release failed at `npm publish` with E404 on the PUT. The runner had npm 10.9.8, which has no OIDC support, and the NPM_TOKEN secret is no longer the publishing path. Use Node 24.x (bundles npm >= 11.5.1), drop NODE_AUTH_TOKEN from the publish step so npm authenticates through the trusted publisher configured for this repo and release.yml, and update CONTRIBUTING accordingly.
1 parent 62802ca commit c7cebb5

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up Node
5454
uses: actions/setup-node@v7
5555
with:
56-
node-version: "22.x"
56+
node-version: "24.x"
5757
registry-url: "https://registry.npmjs.org"
5858
cache: npm
5959

@@ -113,6 +113,9 @@ jobs:
113113
114114
# Idempotent: re-running the job after a partial failure won't hard-fail
115115
# on npm's 409 for an already-published version.
116+
# Publishes via npm trusted publishing (OIDC): needs `id-token: write`
117+
# and npm >= 11.5.1; the trusted publisher is configured on npmjs.com for
118+
# this repo and `release.yml`; no NPM_TOKEN secret is involved.
116119
- name: Publish to npm
117120
run: |
118121
PKG="$(node -p "require('./package.json').name")"
@@ -122,8 +125,6 @@ jobs:
122125
else
123126
npm publish --provenance --access public --tag "${{ steps.version.outputs.NPM_TAG }}"
124127
fi
125-
env:
126-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
127128
128129
- name: Create GitHub Release
129130
uses: softprops/action-gh-release@v3

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,14 @@ The release job will:
6262
3. Publish to npm with [provenance attestation](https://docs.npmjs.com/generating-provenance-statements).
6363
4. Create a GitHub Release with auto-generated release notes.
6464

65+
npm publishing uses [trusted publishing (OIDC)](https://docs.npmjs.com/trusted-publishers)
66+
configured on npmjs.com for this repository (`stablekernel/opencode-cursor`, workflow
67+
`release.yml`), so no npm token secret is needed.
68+
6569
**Required repository secrets** (Settings → Secrets → Actions):
6670

6771
| Secret | Purpose |
6872
| --- | --- |
69-
| `NPM_TOKEN` | npm automation token with `publish` access |
7073
| `CURSOR_API_KEY` | (optional) live-path integration test during release |
7174

7275
**Pre-publish checklist:** update `CHANGELOG.md`, confirm `version` in

0 commit comments

Comments
 (0)