feat: automate release version-sync across public entries - #18
Merged
Conversation
Keep every public version reference in sync on release, mostly by removing the need to touch them: - MCP serverInfo version now comes from -ldflags main.version (via a new WithVersion option) instead of a hardcoded string, so it always matches the built binary. - README Docker quickstart / MCP config use the floating :latest tag; the GitHub Action example uses a moving @v0 major tag. These no longer churn per release. - scripts/release.sh bumps the few genuinely version-pinned spots (server.json version + OCI identifier, and the deliberate pinned-docker example) in one command. - release workflow: on each vX.Y.Z tag it now also publishes server.json to the MCP Registry via GitHub OIDC (no interactive login) and re-points the v0 alias tag. Trigger narrowed to v*.*.* so the alias move can't re-trigger the workflow; v0/v1 excluded from tag protection so the force-move is allowed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces per-release version churn by centralizing/pushing version selection to build metadata and moving tags, while adding automation to publish server.json to the MCP Registry on release tags.
Changes:
- Added a
scripts/release.sh <version>helper to bump the remaining version-pinned references (server.json+ a deliberately pinned README example). - Switched MCP serverInfo versioning to be injected at build time (via
main.version) using a newWithVersionoption. - Updated release automation to publish
server.jsonvia GitHub OIDC and force-move a major alias tag (e.g.v0) on eachvX.Y.Zrelease.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/release.sh | Adds a one-shot script to update remaining pinned version references for releases. |
| README.md | Updates Docker/MCP config to use :latest and switches the Action example to @v0. |
| README.ko.md | Korean README mirrors the Docker/MCP config and Action example updates. |
| internal/mcp/server.go | Introduces WithVersion and removes the hardcoded MCP serverInfo version. |
| cmd/klaws/main.go | Passes the build-time version into the MCP server via WithVersion. |
| .github/workflows/release.yml | Narrows tag trigger, moves a v0 alias tag on release, and publishes server.json to the MCP Registry via OIDC. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Pin mcp-publisher to v1.7.9 and verify its sha256 in the release job, instead of piping releases/latest into tar (supply-chain hardening). - Correct the trigger comment: v*.*.* also matches prerelease tags, not only full releases. - Clarify the Action example comment (EN+KO): @v0 pins the action, not the klaws binary — use the 'version' input to pin the binary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
rostradamus
added a commit
that referenced
this pull request
Jul 8, 2026
Ships everything since v0.1.5: - action installs prebuilt binary instead of go install (#17) - read-only tools report destructive=false (#16) - release version-sync automation (#18) Bumps via scripts/release.sh: server.json version + OCI identifier and the pinned-docker example. MCP serverInfo version comes from ldflags. Co-authored-by: Claude Opus 4.8 (1M context) <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.
Fulfills "when there are new releases, keep every public entry updated." Mostly by removing version references rather than scripting them.
In-repo: fewer things to touch
internal/mcp/server.go— MCPserverInfoversion now comes from-ldflags main.versionvia a newWithVersionoption, instead of a hardcoded"0.1.5". It always matches the built binary. (Verified:-X main.version=0.1.6-test→ serverInfo0.1.6-test; plain build →dev.):latesttag; the GitHub Action example uses a moving@v0major tag. These no longer churn per release.scripts/release.sh <version>— one command bumps the genuinely version-pinned spots that remain:server.json(version + OCI identifier) and the deliberate pinned-docker example. (Tested:scripts/release.sh 0.1.6→ correct diff,server.jsonstill validates.)External: auto-publish on release
release.ymlnow, on eachvX.Y.Ztag:server.jsonto the MCP Registry via GitHub OIDC (mcp-publisher login github-oidc) — no interactive login, so the registry always tracks the latest release.v0alias tag so@v0consumers get the newest release.Supporting changes:
v*→v*.*.*so thev0alias move can't re-trigger the workflow.v*tag-protection ruleset now excludesv0/v1so CI can force-move the alias (exact release tags stay protected).publish-registryjob runs withid-token: write.Not touched (version-agnostic by design)
Glama (auto-rebuilds), Marketplace (tracks releases), awesome-mcp-servers (link only).
How releases work now
scripts/release.sh 0.1.6→ commit on a branch → PR → mergegit tag v0.1.6 && git push origin v0.1.6v0. Update the Marketplace listing to the new release if desired.🤖 Generated with Claude Code