chore(release): bump version to 0.3.14 #62
Workflow file for this run
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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| PYTHON_VERSION: "3.13" | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: othervibes/mcp-as-a-judge | |
| jobs: | |
| build_dist: | |
| name: Build sdist/wheel and verify version | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: latest | |
| - name: Set up Python | |
| run: uv python install ${{ env.PYTHON_VERSION }} | |
| - name: Extract version from tag | |
| id: ver | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Verify version matches pyproject.toml | |
| run: | | |
| PROJECT_VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])") | |
| test "$PROJECT_VERSION" = "${{ steps.ver.outputs.VERSION }}" | |
| - name: Clean dist directory | |
| run: rm -rf dist/ | |
| - name: Build package | |
| run: uv build | |
| - name: Upload dist artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/* | |
| publish_pypi: | |
| name: Publish to PyPI | |
| needs: build_dist | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| docker_build_push: | |
| name: Build & push multi-arch image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Extract version from tag | |
| id: ver | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=ref,event=tag | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| VERSION=${{ steps.ver.outputs.VERSION }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| create_release: | |
| name: Create GitHub Release with artifacts | |
| needs: build_dist | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate changelog | |
| run: | | |
| echo "## What's Changed" > CHANGELOG.md | |
| echo "" >> CHANGELOG.md | |
| git log --oneline --pretty=format:"* %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD >> CHANGELOG.md || echo "* Initial release" >> CHANGELOG.md | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| body_path: CHANGELOG.md | |
| generate_release_notes: true | |
| publish_mcp_registry: | |
| name: Publish to MCP Registry (preview) | |
| needs: [publish_pypi] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install MCP Publisher CLI | |
| run: | | |
| 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 | |
| - name: Extract version from tag | |
| id: ver | |
| run: | | |
| echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Generate server.json | |
| id: server | |
| env: | |
| VERSION: ${{ steps.ver.outputs.VERSION }} | |
| run: | | |
| python - <<'PY' | |
| import json, tomllib, os | |
| VERSION = os.environ['VERSION'] | |
| with open('pyproject.toml','rb') as f: | |
| data = tomllib.load(f) | |
| project = data['project'] | |
| server = { | |
| "name": f"io.github.OtherVibes/{project['name']}", | |
| "description": project['description'], | |
| "version": VERSION, | |
| "homepage": next((url[1] for url in project.get('urls', {}).items() if url[0] == 'Homepage'), ''), | |
| "license": project.get('license', {}).get('text', 'MIT'), | |
| "runtime": { | |
| "type": "uv", | |
| "package": f"{project['name']}=={VERSION}", | |
| "transport": {"type": "stdio"} | |
| } | |
| } | |
| with open('server.json', 'w') as f: | |
| json.dump(server, f, indent=2) | |
| with open(os.environ['GITHUB_OUTPUT'], 'a') as f: | |
| f.write(f"json={json.dumps(server)}\n") | |
| PY | |
| - name: Login to MCP Registry (GitHub OIDC) | |
| run: | | |
| ./mcp-publisher login github-oidc | |
| - name: Publish to MCP Registry | |
| env: | |
| NAME: ${{ fromJSON(steps.server.outputs.json).name }} | |
| run: | | |
| ./mcp-publisher publish server.json | |
| - name: Verify publication | |
| env: | |
| NAME: ${{ fromJSON(steps.server.outputs.json).name }} | |
| VERSION: ${{ fromJSON(steps.server.outputs.json).version }} | |
| run: | | |
| echo "✅ Publication command completed successfully" | |
| echo "📋 Published server: $NAME version $VERSION" | |
| echo "🔍 Verifying publication in registry..." | |
| # Use search parameter to find our server (includes all versions) | |
| server_name_only=$(echo "$NAME" | sed 's/.*\///') | |
| curl -s "https://registry.modelcontextprotocol.io/v0/servers?search=$server_name_only" > search_results.json | |
| # Check if our specific version exists | |
| version_found=$(jq -r --arg name "$NAME" --arg version "$VERSION" '.servers[] | select(.name == $name and .version == $version) | .version' search_results.json) | |
| if [ -n "$version_found" ]; then | |
| echo "✅ Server $NAME version $VERSION is published in MCP Registry!" | |
| echo "📋 Server details:" | |
| jq -r --arg name "$NAME" --arg version "$VERSION" '.servers[] | select(.name == $name and .version == $version) | {name, version, description, is_latest: ._meta."io.modelcontextprotocol.registry/official".is_latest}' search_results.json | |
| # Show all versions of this server | |
| echo "" | |
| echo "� All published versions:" | |
| jq -r --arg name "$NAME" '.servers[] | select(.name == $name) | " - v" + .version + " (latest: " + (._meta."io.modelcontextprotocol.registry/official".is_latest | tostring) + ")"' search_results.json | sort -V | |
| else | |
| echo "❌ Server $NAME version $VERSION not found in registry" | |
| echo "🔍 Available versions for this server:" | |
| jq -r --arg name "$NAME" '.servers[] | select(.name == $name) | " - v" + .version' search_results.json | sort -V | |
| exit 1 | |
| fi |