Skip to content

ci: add automated npm publish workflow for CLI#24

Merged
mgoldsborough merged 1 commit into
mainfrom
ci/cli-publish
Mar 4, 2026
Merged

ci: add automated npm publish workflow for CLI#24
mgoldsborough merged 1 commit into
mainfrom
ci/cli-publish

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

Summary

  • Adds GitHub Actions workflow to automatically publish @nimblebrain/mpak (CLI) to npm on cli-v* tags
  • Mirrors the existing sdk-typescript-publish.yml pattern: verify job (lint, typecheck, test) → publish job (OIDC provenance)
  • Builds full dependency chain (@nimblebrain/mpak...) to include schemas and SDK

Release workflow

# 1. Bump version in packages/cli/package.json
# 2. Commit and push
# 3. Tag and push
git tag cli-v0.2.1 && git push --tags

Test plan

  • Verify workflow file is valid YAML and triggers only on cli-v* tags
  • Confirm npm environment exists in repo settings (already used by SDK workflow)
  • Test with a real tag after merge

Mirrors the existing sdk-typescript-publish workflow. Triggers on
cli-v* tags, verifies tag matches package.json version, runs full
lint/typecheck/test, then publishes to npm with OIDC provenance.
@mgoldsborough mgoldsborough added the pkg/cli mpak CLI (@nimblebrain/mpak) label Feb 26, 2026
Copy link
Copy Markdown
Contributor

@shwetank-dev shwetank-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean implementation. Correctly mirrors sdk-typescript-publish.yml with the right structure: tag trigger → verify → OIDC-provenance publish.

Two nitpicks, both pre-existing patterns in the codebase (same in the SDK workflow):

  • Node version mismatch: verify runs on Node 22, publish builds on Node 24 — the artifact shipped to npm was never directly tested on the version it was built with.
  • Rebuild without artifact sharing: publish rebuilds from scratch rather than consuming the verified artifact from verify. Negligible practical risk with tsup, but technically you're shipping a fresh build rather than the one that passed CI.

Neither is blocking. Both could be addressed in a follow-up cleanup of the SDK workflow too.

Approve.

@mgoldsborough mgoldsborough merged commit 3a332ff into main Mar 4, 2026
2 checks passed
@mgoldsborough mgoldsborough deleted the ci/cli-publish branch March 4, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/cli mpak CLI (@nimblebrain/mpak)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants