ci: use GitHub OIDC for MCP authentication
- Replace non-existent --token-stdin with github-oidc method - Add id-token: write permission for OIDC - Remove MCP_PUBLISH_TOKEN (not needed with OIDC)
This commit is contained in:
@@ -160,6 +160,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
id-token: write # Required for GitHub OIDC authentication
|
||||||
steps:
|
steps:
|
||||||
- name: Download MCP package
|
- name: Download MCP package
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@@ -170,7 +171,6 @@ jobs:
|
|||||||
- name: Install mcp-publisher
|
- name: Install mcp-publisher
|
||||||
run: |
|
run: |
|
||||||
# Download mcp-publisher from correct registry repository
|
# Download mcp-publisher from correct registry repository
|
||||||
# URL format: https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_linux_amd64.tar.gz
|
|
||||||
curl -fsSL -o mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_linux_amd64.tar.gz" || {
|
curl -fsSL -o mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/v1.0.0/mcp-publisher_1.0.0_linux_amd64.tar.gz" || {
|
||||||
echo "⚠️ Failed to download mcp-publisher - MCP publish will be skipped"
|
echo "⚠️ Failed to download mcp-publisher - MCP publish will be skipped"
|
||||||
echo "Install manually: https://github.com/modelcontextprotocol/registry/releases"
|
echo "Install manually: https://github.com/modelcontextprotocol/registry/releases"
|
||||||
@@ -195,8 +195,8 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=== MCP Registry Publish ==="
|
echo "=== MCP Registry Publish ==="
|
||||||
# Login with pre-authenticated token
|
# Use GitHub OIDC for authentication (no token needed)
|
||||||
echo "${{ secrets.MCP_PUBLISH_TOKEN }}" | mcp-publisher login github --token-stdin
|
mcp-publisher login github-oidc
|
||||||
|
|
||||||
# Publish the server
|
# Publish the server
|
||||||
mcp-publisher publish
|
mcp-publisher publish
|
||||||
|
|||||||
Reference in New Issue
Block a user