Skip to content

ci(release): publish to npm on tag push#118

Merged
stackbilt-admin merged 2 commits intomainfrom
ci/npm-publish-automation
Apr 18, 2026
Merged

ci(release): publish to npm on tag push#118
stackbilt-admin merged 2 commits intomainfrom
ci/npm-publish-automation

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

  • Closes the supply-chain gap between GitHub releases and npm publishes. The Release workflow has only ever created a GitHub Release tag — npm publishes were done manually from a maintainer workstation and stopped landing after v0.10.0 (2026-04-09). v0.11.0 tagged 2026-04-16 but never made it to npm; all 11 @stackbilt/* packages still show 0.10.0.
  • Adds a publish-npm job running pnpm -r publish --access public --no-git-checks --provenance on tag push (and workflow_dispatch for backfill). Parallel to the existing publish-release job — neither blocks the other on failure.
  • Version-sync guard: iterates every packages/*/package.json; fails the workflow before any publish call if any package version ≠ tag. Catches half-bumped release PRs.
  • Provenance: --provenance + id-token: write permission links each npm tarball to this GHA run via a cryptographic attestation. Reasonable supply-chain hygiene for an OSS governance package.

Prerequisites

  • NPM_TOKEN repo (or org) secret exists with publish access on @stackbilt/*. Confirmed externally; not set in this PR.

Test plan

  • Merge this PR.
  • Dry-run via workflow_dispatch: gh workflow run release.yml -f tag=v0.11.0.
    • pnpm -r publish is idempotent on already-published versions, so already-shipped 0.10.0 packages no-op and 0.11.0-tagged packages ship.
  • npm view @stackbilt/cli version returns 0.11.0 (and same for the other 10 workspace packages).
  • Each package's npm page shows a "Provenance" badge linking back to this repo + the GHA run.
  • Future tag pushes (e.g. v0.11.1 or v0.12.0) publish automatically without manual intervention.

🤖 Generated with Claude Code

Kurt Overmier and others added 2 commits April 18, 2026 03:24
The existing Release workflow only creates a GitHub Release tag — it
doesn't publish to npm. v0.11.0 has shipped on GitHub since 2026-04-16
but npm is still at 0.10.0 across all 11 workspace packages because
no step invokes `pnpm publish`.

Add a `publish-npm` job parallel to `publish-release`:
- `pnpm -r publish --access public --no-git-checks --provenance`
- version-sync guard (fails if any packages/*/package.json version
  doesn't match the tag)
- `id-token: write` for npm provenance attestation
- same triggers as publish-release (tag push + workflow_dispatch
  backfill)

After merge, backfill v0.11.0 via:
  gh workflow run release.yml -f tag=v0.11.0

Requires `NPM_TOKEN` repository secret (granular automation token
with publish permission on @stackbilt/*).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
One-line comment documenting that the guard enforces unified
workspace versioning. Pre-merge cleanup from CodeBeast review of
#118.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stackbilt-admin stackbilt-admin merged commit 1e1a7c9 into main Apr 18, 2026
3 checks passed
@stackbilt-admin stackbilt-admin deleted the ci/npm-publish-automation branch April 18, 2026 09:54
stackbilt-admin pushed a commit that referenced this pull request Apr 18, 2026
Surface Zod-Core-Out vertical slice (#117):
- analyze() + Zod schemas on @stackbilt/surface
- charter_surface MCP tool in charter serve
- CLI argv routed through SurfaceInputSchema

First release cut through the automated Release workflow
(#118) with npm trusted-publisher OIDC auth across all 11
packages. Provenance attestations replace long-lived NPM_TOKEN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
stackbilt-admin pushed a commit that referenced this pull request Apr 18, 2026
Surface Zod-Core-Out vertical slice (#117):
- analyze() + Zod schemas on @stackbilt/surface
- charter_surface MCP tool in charter serve
- CLI argv routed through SurfaceInputSchema

First release cut through the automated Release workflow
(#118) with npm trusted-publisher OIDC auth across all 11
packages. Provenance attestations replace long-lived NPM_TOKEN.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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