Skip to content

Commit c8e7040

Browse files
author
mcp-release-bot
committed
ci: add manual 'Release E2E' workflow; enhance MCP Registry publish/verify; add OCI label and PyPI marker
1 parent 72e0c32 commit c8e7040

File tree

4 files changed

+169
-7
lines changed

4 files changed

+169
-7
lines changed

.github/workflows/release-e2e.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Release E2E
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Semantic version (e.g., 0.3.0)"
8+
required: true
9+
type: string
10+
11+
env:
12+
PYTHON_VERSION: "3.13"
13+
14+
jobs:
15+
prepare_and_push:
16+
name: Bump, commit, tag, and push (main)
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
id-token: write
21+
steps:
22+
- name: Checkout repo
23+
uses: actions/checkout@v5
24+
with:
25+
fetch-depth: 0
26+
persist-credentials: false
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v6
30+
with:
31+
version: latest
32+
33+
- name: Set up Python
34+
run: uv python install ${{ env.PYTHON_VERSION }}
35+
36+
- name: Validate input version and tag uniqueness
37+
id: validate
38+
run: |
39+
set -euo pipefail
40+
VERSION="${{ inputs.version }}"
41+
if ! echo "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+$'; then
42+
echo "Invalid version format: $VERSION (expected MAJOR.MINOR.PATCH)" >&2
43+
exit 1
44+
fi
45+
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
46+
echo "Tag v$VERSION already exists locally" >&2
47+
exit 1
48+
fi
49+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
50+
51+
- name: Bump version in files
52+
run: |
53+
uv run python scripts/bump_version.py --version "${{ steps.validate.outputs.VERSION }}" | tee bump.log
54+
55+
- name: Create GitHub App token
56+
id: app_token
57+
uses: actions/create-github-app-token@v1
58+
with:
59+
app-id: ${{ secrets.APP_ID }}
60+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
61+
62+
- name: Configure git user
63+
run: |
64+
git config user.name "mcp-release-bot"
65+
git config user.email "mcp-release-bot@users.noreply.github.com"
66+
67+
- name: Ensure on main branch
68+
run: |
69+
git fetch origin main --tags
70+
git checkout main
71+
72+
- name: Commit changes (if any)
73+
run: |
74+
set -e
75+
if git diff --quiet; then
76+
echo "No working tree changes to commit."
77+
else
78+
git add -A
79+
git commit -m "chore(release): bump version to ${{ steps.validate.outputs.VERSION }}"
80+
fi
81+
82+
- name: Create tag
83+
run: |
84+
git tag "v${{ steps.validate.outputs.VERSION }}"
85+
86+
- name: Push commit and tag to origin/main
87+
env:
88+
GH_TOKEN: ${{ steps.app_token.outputs.token }}
89+
run: |
90+
set -e
91+
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
92+
git push origin HEAD:main
93+
git push origin "v${{ steps.validate.outputs.VERSION }}"
94+
95+
- name: Summary
96+
run: echo "Pushed commit and tag v${{ steps.validate.outputs.VERSION }}. The Release workflow will run automatically."
97+

.github/workflows/release.yml

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,69 @@ jobs:
139139

140140
publish_mcp_registry:
141141
name: Publish to MCP Registry (preview)
142-
runs-on: macos-latest
142+
runs-on: ubuntu-latest
143143
permissions:
144144
contents: read
145+
id-token: write
145146
continue-on-error: true
146147
steps:
147148
- uses: actions/checkout@v5
148149
- name: Install MCP Publisher CLI
149-
run: brew install mcp-publisher
150-
- name: Initialize server metadata (idempotent)
151-
run: mcp-publisher init || true
150+
run: |
151+
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
152+
- name: Extract version from tag
153+
id: ver
154+
run: |
155+
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
156+
- name: Generate server.json
157+
env:
158+
VERSION: ${{ steps.ver.outputs.VERSION }}
159+
run: |
160+
python - <<'PY'
161+
import json, tomllib, os
162+
VERSION = os.environ['VERSION']
163+
with open('pyproject.toml','rb') as f:
164+
proj = tomllib.load(f)['project']
165+
desc = proj.get('description','')
166+
data = {
167+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
168+
"name": "io.github.othervibes/mcp-as-a-judge",
169+
"description": desc,
170+
"version": VERSION,
171+
"packages": [
172+
{"registry_type": "pypi", "identifier": "mcp-as-a-judge", "version": VERSION},
173+
{"registry_type": "oci", "registry_base_url": "https://ghcr.io", "identifier": "othervibes/mcp-as-a-judge", "version": VERSION}
174+
]
175+
}
176+
with open('server.json','w') as f: json.dump(data,f,indent=2)
177+
PY
178+
- name: Login to MCP Registry (GitHub OIDC)
179+
run: ./mcp-publisher login github-oidc
152180
- name: Publish to MCP Registry
181+
run: ./mcp-publisher publish
182+
- name: Verify publication
153183
env:
154-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
155-
run: mcp-publisher publish
184+
NAME: io.github.othervibes/mcp-as-a-judge
185+
run: |
186+
for i in {1..10}; do
187+
sleep 3
188+
curl -sf "https://registry.modelcontextprotocol.io/v0/servers?search=$NAME" -o out.json || true
189+
python - <<'PY'
190+
import json, sys, os
191+
name = os.environ['NAME']
192+
try:
193+
data=json.load(open('out.json'))
194+
except Exception:
195+
sys.exit(1)
196+
items = []
197+
if isinstance(data, dict):
198+
items = data.get('results') or data.get('servers') or data.get('data') or []
199+
elif isinstance(data, list):
200+
items = data
201+
ok = any(isinstance(s, dict) and s.get('name') == name for s in items)
202+
sys.exit(0 if ok else 1)
203+
PY
204+
if [ $? -eq 0 ]; then echo "Verified $NAME in registry"; exit 0; fi
205+
done
206+
echo "Server not visible in registry yet"
207+
exit 1

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
7676
CMD ["mcp-as-a-judge"]
7777

7878
# Labels for metadata
79-
LABEL org.opencontainers.image.title="MCP as a Judge" \
79+
LABEL io.modelcontextprotocol.server.name="io.github.othervibes/mcp-as-a-judge" \
80+
org.opencontainers.image.title="MCP as a Judge" \
8081
org.opencontainers.image.description="AI-powered code evaluation and software engineering best practices enforcement" \
8182
org.opencontainers.image.version="${VERSION}" \
8283
org.opencontainers.image.authors="Zvi Fried" \

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MCP as a Judge ⚖️
22

3+
<!-- mcp-name: io.github.othervibes/mcp-as-a-judge -->
4+
35
<div align="left">
46
<img src="assets/mcp-as-a-judge.png" alt="MCP as a Judge Logo" width="200">
57
</div>
@@ -103,6 +105,16 @@ Configure **MCP as a Judge** in your MCP-enabled client:
103105

104106
### **Method 1: Using Docker (Recommended)**
105107

108+
#### One‑click install for VS Code (MCP)
109+
110+
Add this server to VS Code (GitHub Copilot) using Docker with automatic image pull:
111+
112+
- Install link: https://insiders.vscode.dev/redirect/mcp/install?name=mcp-as-a-judge&inputs=%5B%5D&config=%7B%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-i%22%2C%22--rm%22%2C%22--pull%3Dalways%22%2C%22ghcr.io%2Fothervibes%2Fmcp-as-a-judge%3Alatest%22%5D%7D
113+
114+
Notes:
115+
- VS Code controls the sampling model; select it via “MCP: List Servers → mcp-as-a-judge → Configure Model Access”.
116+
117+
106118
1. **Configure MCP Settings:**
107119

108120
Add this to your MCP client configuration file:

0 commit comments

Comments
 (0)