Skip to content

Commit 9608572

Browse files
author
mcp-release-bot
committed
ci(mcp): add manual workflow to publish to MCP Registry with 100-char description clamp
1 parent b70bf42 commit 9608572

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/publish-mcp.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Publish MCP Registry (manual)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version to publish (e.g., 0.3.1)"
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
env:
16+
PYTHON_VERSION: "3.13"
17+
18+
jobs:
19+
publish:
20+
name: Publish to MCP Registry
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v5
24+
with:
25+
fetch-depth: 1
26+
27+
- name: Install MCP Publisher CLI
28+
run: |
29+
curl -L "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher
30+
31+
- name: Generate server.json (clamped description)
32+
env:
33+
VERSION: ${{ inputs.version }}
34+
run: |
35+
python - <<'PY'
36+
import json, tomllib, os
37+
VERSION = os.environ['VERSION']
38+
with open('pyproject.toml','rb') as f:
39+
proj = tomllib.load(f)['project']
40+
desc = (proj.get('description','') or '')[:100]
41+
data = {
42+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
43+
"name": "io.github.othervibes/mcp-as-a-judge",
44+
"description": desc,
45+
"version": VERSION,
46+
"packages": [
47+
{"registry_type": "pypi", "identifier": "mcp-as-a-judge", "version": VERSION},
48+
{"registry_type": "oci", "registry_base_url": "https://ghcr.io", "identifier": "othervibes/mcp-as-a-judge", "version": VERSION}
49+
]
50+
}
51+
with open('server.json','w') as f: json.dump(data,f,indent=2)
52+
PY
53+
54+
- name: Login to MCP Registry (GitHub OIDC)
55+
run: ./mcp-publisher login github-oidc
56+
57+
- name: Publish to MCP Registry
58+
run: ./mcp-publisher publish
59+
60+
- name: Show server.json
61+
run: cat server.json
62+

0 commit comments

Comments
 (0)