Rename server for better discoverability: xcode-mcpbridge-wrapper #8
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: Publish to MCP Registry | |
| on: | |
| push: | |
| tags: ["v*"] # Triggers on version tags like v1.0.0 | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC authentication | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| # Publish underlying PyPI package: | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build twine | |
| - name: Build package | |
| run: python -m build | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true | |
| # Publish MCP server: | |
| - name: Install mcp-publisher | |
| run: | | |
| curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher | |
| - name: Authenticate to MCP Registry | |
| run: ./mcp-publisher login github-oidc | |
| - name: Set version in server.json | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| # If version is empty (manual trigger without tag), use version from pyproject.toml | |
| if [ -z "$VERSION" ]; then | |
| VERSION=$(grep -E '^version\s*=\s*"[^"]+"' pyproject.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/') | |
| fi | |
| echo "Publishing version: $VERSION" | |
| jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.tmp && mv server.tmp server.json | |
| - name: Publish server to MCP Registry | |
| run: ./mcp-publisher publish |