Repository navigation
Fix release authentication with npm trusted publishing - #317
Merged
Merged
Conversation
nahiyankhan
force-pushed
the
fix/npm-trusted-publishing
branch
from
December 1, 2026 19:18
ca5c915 to
34af0e3
Compare
nahiyankhan
marked this pull request as ready for review
December 1, 2026 19:25
chailandau
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category: infrastructure
User Impact: Restore the release pipeline so pending ghost updates can reach npm and downstream distributions.
Problem: Main's quality gate and docs deploy pass, but the Release run fails publishing
0.35.1with npmE404on the package PUT. The workflow supplies a legacy publish token; logs cannot distinguish token expiry, lost access, or a publishing-policy restriction.Solution: Remove the token mappings and setup-node token-auth configuration so the pinned Changesets action uses GitHub OIDC. Preserve the existing publish/output flow, add regression checks, and document npm-side setup.
Merge prerequisite: npm package-owner setup
Before merging, configure a GitHub Actions trusted publisher for
@design-intelligence/ghost:block; repository:ghost.release.yml; environment: blank.npm publish. Stage-only authorization does not permit Changesets publishing.Create it close to merge: npm requires its first successful publish within two days. CI on this PR cannot validate npm-side authorization. After merge, verify npm publication, the GitHub Release/tarball, and configured downstream syncs before revoking the obsolete token and removing its repository secret. No release has been retried or dispatched as part of this patch.
Validation:
pnpm exec vitest run packages/ghost/test/release-workflows.test.ts: 11 tests pass.node scripts/check-release-workflows.mjs: passes.node scripts/check-terminology.mjs: passes.pnpm exec biome check scripts/check-release-workflows.mjs packages/ghost/test/release-workflows.test.ts: passes.git diff --check: passes.quality:all: not reached. Frozen installs repeatedly fail because Cloudflare Gateway returns HTML block pages for npm dependency tarball URLs, causing integrity failures. Lockfile/checksums are unchanged; integrity verification remains enabled. Local commit/push hooks were skipped for this draft because they rerun the full suite against the incomplete install. GitHub CI must pass before merge.Changeset: Not needed: CI authentication, internal checks/tests, and maintainer documentation only; no public package behavior changes.
ghost Review: Not run: no surface, guidance corpus, generation behavior, or review-packet changes.
File changes
.github/workflows/release.yml: remove both npm publish-token mappings and setup-noderegistry-url; retain OIDC permission and the Changesets release flow.scripts/check-release-workflows.mjs: enforce the tokenless authentication contract alongside existing release assertions.packages/ghost/test/release-workflows.test.ts: exercise passing workflows and auth/publishing regressions using temporary workflow copies.CONTRIBUTING.md: document exact trusted-publisher settings, migration sequencing, and authorization-verification limits.Screenshots/Demos: N/A.