Automate packkit-mcp publishing everywhere#10
Merged
Conversation
The release workflow published packkit-mcp to npm but stopped there, so server.json, the official MCP registry entry and the version the server reports over MCP all had to be updated by hand — and quietly drifted. - scripts/sync-mcp-version.mjs rewrites server.json + mcp/server.js from mcp/package.json, and fails loudly if mcpName and server.json's name disagree (that mismatch cost us a burnt npm version). - Publish to the official registry via mcp-publisher's GitHub OIDC login, so no new secrets. Gated on the npm publish actually happening, since the registry verifies ownership by fetching the npm package. - Refresh mcp/package-lock.json against the just-published create-packkit. npx users get the newest core via the caret, but `npm ci` builds — Glama's — install what the lockfile pins, which is the real staleness. Only Glama's Build & Release stays manual; its API is read-only. Documented the whole chain, and its gotchas, in mcp/RELEASING.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Follow-up to #9, which documented the release process. This automates it.
release.ymlpublishedpackkit-mcpto npm and stopped there. Everything after that —server.json, the official MCP registry entry, the version the server advertises over MCP, and thecreate-packkitpin inmcp/package-lock.json— was manual, so it drifted.What changed
scripts/sync-mcp-version.mjs(alsonpm run sync:mcp) rewritesserver.jsonandmcp/server.jsfrommcp/package.json, and exits non-zero ifmcpNameandserver.json'snamedisagree. That mismatch is case-sensitive and already cost us a burnt npm version — a published version can't be overwritten, so 0.1.2 had to be abandoned for 0.1.3.Official MCP registry publish via
mcp-publisher login github-oidc. No new secrets — the workflow already hadid-token: write. Gated on the npm publish step actually publishing, because the registry verifies ownership by fetching the npm package and rejects a version that isn't up yet.Lockfile refresh.
packkit-mcppinscreate-packkitby caret, sonpx -y packkit-mcpalready resolves the newest core and doesn't need a republish per release. Butmcp/package-lock.jsonwas pinning 2.7.0 against a latest of 2.7.2, and builds that runnpm ci— Glama's hosted build — install what the lockfile says. That was the actual staleness, so the workflow now refreshes and pushes the lockfile after publishing, rather than bumping the package version every release.mcp/RELEASING.mdis updated to match: only Glama's Build & Release stays manual, since its public API is read-only.Testing
sync-mcp-version.mjswas exercised against a simulated 0.1.4 bump (correctly rewroteserver.json's two version fields andmcp/server.js), against an intentionalmcpNamemismatch (exit 1 with an explanatory message), and confirmed idempotent on the current tree.release.ymlvalidated as YAML.🤖 Generated with Claude Code