Skip to content

Prep npm publish jobs for Trusted Publishing (OIDC) - #31

Merged
crewcricle merged 1 commit into
mainfrom
chore/npm-trusted-publishing
Jul 28, 2026
Merged

Prep npm publish jobs for Trusted Publishing (OIDC)#31
crewcricle merged 1 commit into
mainfrom
chore/npm-trusted-publishing

Conversation

@rprabhat

Copy link
Copy Markdown
Collaborator

Summary

Read docs.npmjs.com/trusted-publishers directly (not from training data — this is a newer feature) and bumped both publish-knowledge and publish-docs-gen jobs to meet its hard requirements:

  • Node 20 → 22 (OIDC requires Node ≥22.14.0)
  • Added an explicit npm install -g npm@^11.5.1 step (Node 22's bundled npm may be older than the required ≥11.5.1; setup-node doesn't let you pin the npm CLI version separately)
  • permissions.id-token: write was already present at the workflow level from the original scaffolding — no change needed there

NPM_TOKEN stays wired as a fallback rather than being removed: per the docs, npm CLI auto-detects and prefers the OIDC/trusted-publisher path once it's configured for a package, falling back to the token otherwise. So this PR is safe to merge now, before trusted publishing is actually set up.

Important — this does NOT unblock publishing by itself

Trusted Publishing is configured per-package on npmjs.com (Settings → Trusted Publisher → GitHub Actions → org/repo/workflow filename), which requires being logged into the npm account. The docs don't clearly state whether it can be configured before a package's first publish, or whether the @crewcircle npm organization still needs to exist first (previous attempts at creating it weren't working — cause unconfirmed, needs another look on npmjs.com directly). This PR just makes the workflow ready for OIDC once that's sorted out.

Test plan

  • YAML validated
  • permissions.id-token: write confirmed present
  • Actual OIDC publish — blocked on npmjs.com-side trusted publisher configuration, can't be tested until that exists

🤖 Generated with Claude Code

Bumps Node to 22 and pins npm CLI >=11.5.1 in both publish jobs —
npm's trusted-publishing docs (docs.npmjs.com/trusted-publishers)
specify these as hard minimums for the OIDC exchange. permissions.id-token
was already set at the workflow level from the original scaffolding.

NPM_TOKEN stays as a fallback: npm CLI auto-detects and prefers the
OIDC/id-token environment once trusted publishing is configured for a
package on npmjs.com, no further workflow change needed at that point.

Note: this does not remove the need to create the @crewcircle npm
organization first — trusted publishing is configured per-package on
npmjs.com and doesn't appear to support reserving a scope that doesn't
exist yet (unclear from docs whether it works before a package's first
publish at all; docs.npmjs.com/creating-an-organization is still the
path to actually create the org).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
crewcircle-website Ready Ready Preview, Comment Jul 28, 2026 5:19am

@crewcricle
crewcricle merged commit ec91b8e into main Jul 28, 2026
8 checks passed
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