Skip to content

Conversation

@Shigoto-dev19
Copy link
Contributor

@Shigoto-dev19 Shigoto-dev19 commented Feb 6, 2026

Cloeses https://github.com/o1-labs/o1js-site/issues/3.
Sibling of PR #142.

Summary

  • Remove registry-url from actions/setup-node: it generates an .npmrc that conflicts with npm's OIDC trusted publishing authentication

  • Add --provenance to npm publish: signs the package with a build attestation linking it to this repo and workflow

  • Add workflow_dispatch trigger: allows manual publishes from the GitHub Actions UI

  • NOTE:

    • This PR does everything as PR #142 . However fix: release workflow #142 didn't add --provenance. Without it, the id-token: write permission is set up but never actually used. The OIDC token gets requested but npm publish doesn't attach it as a signed attestation to the package. So it's a fix on top of what PR fix: release workflow #142 had.

Publishing process

Pre-release steps

  1. Bump the version in package.json (e.g. npm version patch / minor / major)
  2. Commit the version bump
  3. Tag the commit: git tag v<version> (e.g. git tag v0.1.0)
  4. Push both: git push origin main --tags

The workflow triggers automatically on the v* tag push. It will:

  1. Install dependencies (npm ci)
  2. Build the package (npm run build)
  3. Run tests (npm test)
  4. Publish to npm with provenance attestation

Alternatively, you can trigger the workflow manually from the Actions tab using "Run workflow" on any branch.

Prerequisites

  • npm trusted publishing must be configured for this package on npmjs.com, linking it to this GitHub repo (already done by Leon)
  • The version in package.json must not already be published on npm

Test plan

  • Trigger workflow manually via workflow_dispatch to verify it authenticates and publishes correctly
  • Verify the published package on npmjs.com shows provenance information

@Shigoto-dev19 Shigoto-dev19 requested a review from Trivo25 February 6, 2026 13:10
@Shigoto-dev19 Shigoto-dev19 merged commit a210b2a into main Feb 9, 2026
5 checks passed
@Shigoto-dev19 Shigoto-dev19 deleted the shigoto/fix-npm-publish-workflow branch February 9, 2026 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants