From 7b75ac9d9d0865d0ec4c9aac7ae0966f4d5249b1 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 11 Oct 2026 09:27:31 +0000 Subject: [PATCH] Publish: a version already in the MCP Registry is not a failure Re-running Publish for a registered version (a release published after a manual run, as with v0.1.14) failed at the last step with 400 "cannot publish duplicate version", though nothing was wrong. That reply now passes with a notice; any other registry error still fails the run. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_013F6VMUcDtZmJX3ZibLuzXg --- .github/workflows/publish.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 06e4b1a..98d894d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -64,4 +64,14 @@ jobs: version=$(grep -oP '(?<=)[^<]+' src/Directory.Build.props) sed "s/0\.0\.0-dev/${version}/g" src/CodeMap.Mcp/.mcp/server.json > server.publish.json ./mcp-publisher login github-oidc - ./mcp-publisher publish server.publish.json + # A version that is already registered (say, a release re-run after a manual run) is not + # an error: the registry answers 400 "cannot publish duplicate version". Anything else fails. + if ! out=$(./mcp-publisher publish server.publish.json 2>&1); then + echo "$out" + if grep -q "cannot publish duplicate version" <<<"$out"; then + echo "::notice::io.github.Karzone/TestAtlas.Mcp ${version} is already in the MCP Registry; nothing to publish." + exit 0 + fi + exit 1 + fi + echo "$out"