o1-labs / o1-labs/Archive-Node-API
npm publishing from CI has never worked: trusted publisher is not configured (v0.0.9 tagged but unpublished)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 19
- Forks
- 9
- Avg merge
- 14h 20m
- Merged PRs (30d)
- 8
Description
Current state
v0.0.9 is tagged at e353bbc and is not published. npm still serves only 0.0.6. The tag is valid and the workflow file at that commit is correct — the only missing piece is on the npm side.
Not urgent: the Docker image is the artifact currently being consumed, so this blocks the npm channel only.
Symptom
Run 30543971082 got all the way through Update npm, npm ci, npm run build, and a full green npm test, then failed on the last step:
npm error code ENEEDAUTH
npm error need auth This command requires you to be logged in to https://registry.npmjs.org/
The tarball itself built fine — 0.0.9, 136 files, 100.2 kB packed / 524.2 kB unpacked.
Root cause
publish-npm.yml depends entirely on OIDC trusted publishing. It declares permissions: id-token: write, but:
- it sets no
NODE_AUTH_TOKEN, andactions/setup-node@v4is configured withoutregistry-url, so no.npmrcis ever written — there is no token fallback; - the repository has no npm credential of any kind (
gh secret listreturns onlyGCP_SA_KEY).
So the publish can only succeed if npm accepts the OIDC token via a trusted publisher configured on the package. That configuration does not exist, hence ENEEDAUTH.
This has never worked
Worth recording explicitly, because the workflow's presence implies otherwise:
0.0.6was published at2026-04-27T22:48:59.899Zby npm usero1-labs <npm@o1labs.org>, and the package'screatedtimestamp is the same instant.- No CI run exists at that time. The nearest successful
Publish Packagerun was20344320453on 2025-12-18, four months earlier, from aworkflow_dispatchon branchleon/fix-release-workflow. - Every tag-triggered publish run in this repo's history has failed:
v0.0.6(25001081251),v0.0.9first attempt (30540591005, a separate Node-engine bug fixed in #207), andv0.0.9second attempt (30543971082, this issue).
0.0.6 was published by hand. The OIDC path in publish-npm.yml has never once succeeded end to end, so --provenance has never actually been exercised.
Fix (requires @o1-labs npm org owner/admin)
On npmjs.com → @o1-labs/mina-archive-node-graphql → Settings → Trusted Publisher → GitHub Actions:
| Field | Value |
|---|---|
| Organization or user | o1-labs |
| Repository | Archive-Node-API |
| Workflow filename | publish-npm.yml |
| Environment | (leave blank) |
The environment field must stay empty: jobs.publish declares no environment:, so a non-empty value on npm's side produces an OIDC claim mismatch and the same failure. The workflow filename must be the bare basename, not a path.
Once saved, gh run rerun --failed 30543971082 completes the v0.0.9 release — no re-tagging needed, since v0.0.9 already points at e353bbc and that commit's workflow file is correct.
Alternative, if trusted publishing is not wanted
Add an npm automation or granular-write token as repo secret NPM_TOKEN, then patch the workflow:
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
...
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
This introduces a long-lived credential to rotate, which is why trusted publishing is preferable. It would also require moving the v0.0.9 tag again, since the workflow file would change.
Suggested follow-up
Whichever path is taken, the first successful run should be treated as the real test of this workflow — it will be the first time the publish step has ever passed. Worth confirming afterwards that the provenance attestation on the published 0.0.9 points at e353bbc.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with publish-npm.yml and the failed GitHub Actions run 30543971082; review the publish step and its OIDC authentication setup. Check the npm package's trusted publisher configuration against the repository and workflow details, then rerun the failed job. Done means v0.0.9 is published successfully with provenance pointing to e353bbc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, nodejs, typescript
- Domain
- ci-cd, devops, release
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100