Skip to content

ci: add publish to npm workflow#4

Merged
guyinwonder168 merged 1 commit intomainfrom
feat/npm-publish-workflow
Apr 3, 2026
Merged

ci: add publish to npm workflow#4
guyinwonder168 merged 1 commit intomainfrom
feat/npm-publish-workflow

Conversation

@guyinwonder168
Copy link
Copy Markdown
Owner

Summary

  • Add .github/workflows/publish.yml that triggers on GitHub Release published
  • Runs build → typecheck → lint → test → npm publish --provenance --access public
  • Uses Node 22 (matching CI), NPM_TOKEN secret for authentication
  • Includes supply-chain attestation via --provenance + id-token: write

Setup required

  1. Create an npmjs.com Automation token (Access Tokens → Automation)
  2. Add it as NPM_TOKEN secret in repo Settings → Secrets
  3. Create a GitHub Release to trigger the publish

Workflow

GitHub Release (published)
  → npm ci
  → npm run build
  → npm run typecheck
  → npm run lint
  → npm test
  → npm publish --provenance --access public

Triggers on GitHub Release published.
Runs build, typecheck, lint, test, then npm publish with --provenance.

Requires NPM_TOKEN secret on the repo.
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Apr 3, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • .github/workflows/publish.yml - No issues

Review Details

The new npm publish workflow looks good:

  • Uses release: published trigger (appropriate for npm packages)
  • Proper permissions (contents: read, packages: write, id-token: write)
  • Node.js 22 with npm registry configuration
  • Runs build, typecheck, lint, and tests before publishing
  • Uses --provenance for supply chain security and --access public for publishing
  • Properly references NPM_TOKEN secret

The package.json also has correct publishing configuration (publishConfig.access: public).


Reviewed by minimax-m2.5-20260211 · 103,064 tokens

@guyinwonder168 guyinwonder168 merged commit 4801b4c into main Apr 3, 2026
4 checks passed
@guyinwonder168 guyinwonder168 deleted the feat/npm-publish-workflow branch April 3, 2026 20:26
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