Skip to content

ci: support npm authenticated publishing#86

Draft
nahiyankhan wants to merge 1 commit into
mainfrom
codex/npm-publish-auth
Draft

ci: support npm authenticated publishing#86
nahiyankhan wants to merge 1 commit into
mainfrom
codex/npm-publish-auth

Conversation

@nahiyankhan
Copy link
Copy Markdown
Collaborator

🤖 This PR updates the Release workflow so @anarchitecture/ghost can publish through either repo-provided npm credentials or npm Trusted Publishing.

Changes:

  • Updates actions/setup-node to v6 and uses Node 24 for a modern npm CLI.
  • Publishes the package with npm publish ./packages/ghost --access public --provenance so npm OIDC/trusted publishing can work.
  • Reads the npm token from either NPM_PUBLISH_TOKEN or the conventional NPM_TOKEN GitHub Actions secret.
  • Removes the separate NODE_AUTH_TOKEN env because Changesets writes npm auth from NPM_TOKEN when a token is present.

Local verification:

  • pnpm check
  • pnpm build
  • pnpm test via pre-push, 479 tests passing
  • npm_config_cache=/private/tmp/ghost-npm-cache npm pack ./packages/ghost --dry-run --ignore-scripts

Remaining setup before merging the release PR:

  • Add a repo secret named NPM_PUBLISH_TOKEN or NPM_TOKEN containing an npm publish token for @anarchitecture/ghost; or
  • Configure npm Trusted Publishing for package @anarchitecture/ghost with owner block, repository ghost, workflow Release, and branch main.

- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0

- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.0.0
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