diff --git a/.github/workflows/publish-mcp-registry.yml b/.github/workflows/publish-mcp-registry.yml deleted file mode 100644 index 4169f22..0000000 --- a/.github/workflows/publish-mcp-registry.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Publish to MCP Registry - -on: - release: - types: [published] - workflow_dispatch: - -permissions: - contents: read - id-token: write # Required for OIDC authentication with MCP Registry - -jobs: - publish: - name: Publish server.json to MCP Registry - runs-on: ubuntu-24.04 - steps: - - name: Checkout repo - uses: actions/checkout@v7 - - - name: Extract version from release tag - id: version - run: | - TAG="${{ github.event.release.tag_name }}" - if [ -z "$TAG" ]; then - TAG="$(git describe --tags --abbrev=0)" - fi - VERSION="${TAG#v}" - echo "tag=$TAG" >> "$GITHUB_OUTPUT" - echo "version=$VERSION" >> "$GITHUB_OUTPUT" - - - name: Set version in server.json - run: | - VERSION="${{ steps.version.outputs.version }}" - echo "Setting server.json version to $VERSION" - jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.json.tmp - mv server.json.tmp server.json - echo "=== Updated server.json ===" - cat server.json - - - 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 (OIDC) - run: ./mcp-publisher login github-oidc - - - name: Publish server to MCP Registry - run: ./mcp-publisher publish diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bf4975d..8198943 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Publish to PyPI +name: Publish to PyPI and MCP Registry on: release: @@ -72,3 +72,44 @@ jobs: - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + publish-mcp-registry: + name: Publish server.json to MCP Registry + needs: publish + runs-on: ubuntu-24.04 + permissions: + contents: read + id-token: write # Required for OIDC authentication with MCP Registry + steps: + - name: Checkout repo + uses: actions/checkout@v7 + + - name: Extract version from release tag + id: version + run: | + TAG="${{ github.event.release.tag_name }}" + if [ -z "$TAG" ]; then + TAG="$(git describe --tags --abbrev=0)" + fi + VERSION="${TAG#v}" + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Set version in server.json + run: | + VERSION="${{ steps.version.outputs.version }}" + echo "Setting server.json version to $VERSION" + jq --arg v "$VERSION" '.version = $v | .packages[0].version = $v' server.json > server.json.tmp + mv server.json.tmp server.json + echo "=== Updated server.json ===" + cat server.json + + - 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 (OIDC) + run: ./mcp-publisher login github-oidc + + - name: Publish server to MCP Registry + run: ./mcp-publisher publish