Skip to content

[codex] Switch npm release to trusted publishing#10

Merged
nahtnam merged 1 commit into
mainfrom
codex/npm-trusted-publishing
Jun 17, 2026
Merged

[codex] Switch npm release to trusted publishing#10
nahtnam merged 1 commit into
mainfrom
codex/npm-trusted-publishing

Conversation

@nahtnam

@nahtnam nahtnam commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Grants the release workflow id-token: write so npm can use GitHub Actions OIDC trusted publishing.
  • Keeps contents: write and pull-requests: write for Changesets version PRs/commits.
  • Configures actions/setup-node with the npm registry URL.
  • Installs the latest npm CLI before changeset publish, then removes the long-lived NPM_TOKEN from the publish environment.

Why

The publish run failed with npm E404 Not Found while trying to publish patchworks@0.1.3, which is the error npm returns when the registry request is not authorized for that package. Moving to trusted publishing avoids a stale or incorrectly scoped npm token and lets npm authorize the exact GitHub Actions workflow through OIDC.

Required npm setup

Configure the patchworks package on npmjs.com with a Trusted Publisher:

  • Provider: GitHub Actions
  • Organization/user: ludicroushq
  • Repository: patchworks
  • Workflow filename: release.yaml
  • Allowed action: npm publish

Validation

  • pnpm run ci:test:pretty
  • git diff --check

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
patchworks Error Error Jun 17, 2026 3:04am

@nahtnam nahtnam marked this pull request as ready for review June 17, 2026 03:05
@nahtnam nahtnam merged commit 66c05b3 into main Jun 17, 2026
4 of 5 checks passed
@nahtnam nahtnam deleted the codex/npm-trusted-publishing branch June 17, 2026 03:05
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.

1 participant