Skip to content

feat: automate release version-sync across public entries - #18

Merged
rostradamus merged 2 commits into
mainfrom
feat/release-automation
Jul 7, 2026
Merged

feat: automate release version-sync across public entries#18
rostradamus merged 2 commits into
mainfrom
feat/release-automation

Conversation

@rostradamus

Copy link
Copy Markdown
Owner

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 — MCP serverInfo version now comes from -ldflags main.version via a new WithVersion option, instead of a hardcoded "0.1.5". It always matches the built binary. (Verified: -X main.version=0.1.6-test → serverInfo 0.1.6-test; plain build → dev.)
  • READMEs — 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 <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.json still validates.)

External: auto-publish on release

release.yml now, on each vX.Y.Z tag:

  1. Builds artifacts (goreleaser, unchanged).
  2. Publishes server.json to the MCP Registry via GitHub OIDC (mcp-publisher login github-oidc) — no interactive login, so the registry always tracks the latest release.
  3. Re-points the v0 alias tag so @v0 consumers get the newest release.

Supporting changes:

  • Trigger narrowed v*v*.*.* so the v0 alias move can't re-trigger the workflow.
  • The v* tag-protection ruleset now excludes v0/v1 so CI can force-move the alias (exact release tags stay protected).
  • publish-registry job runs with id-token: write.

Not touched (version-agnostic by design)

Glama (auto-rebuilds), Marketplace (tracks releases), awesome-mcp-servers (link only).

How releases work now

  1. scripts/release.sh 0.1.6 → commit on a branch → PR → merge
  2. git tag v0.1.6 && git push origin v0.1.6
  3. Workflow builds, publishes to the registry, moves v0. Update the Marketplace listing to the new release if desired.

🤖 Generated with Claude Code

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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 new WithVersion option.
  • Updated release automation to publish server.json via GitHub OIDC and force-move a major alias tag (e.g. v0) on each vX.Y.Z release.

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.

Comment thread README.md Outdated
Comment thread README.ko.md Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml
- 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>
@rostradamus
rostradamus merged commit fb14e2d into main Jul 7, 2026
4 checks passed
@rostradamus
rostradamus deleted the feat/release-automation branch July 7, 2026 19:30
@rostradamus rostradamus mentioned this pull request Jul 7, 2026
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>
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.

2 participants