@@ -16,33 +16,38 @@ jobs:
1616 - name : Checkout code
1717 uses : actions/checkout@v5
1818
19+ - name : Setup Go
20+ uses : actions/setup-go@v5
21+ with :
22+ go-version : " stable"
23+
1924 - name : Fetch tags
2025 run : git fetch --tags
2126
2227 - name : Install MCP Publisher
2328 run : |
24- 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
29+ git clone --quiet https://github.com/modelcontextprotocol/registry publisher-repo
30+ cd publisher-repo && make publisher > /dev/null && cd ..
31+ cp publisher-repo/bin/mcp-publisher . && chmod +x mcp-publisher
2532
2633 - name : Update server.json version
2734 run : |
2835 if [[ "${{ github.ref_type }}" == "tag" ]]; then
29- # Use the tag that triggered the workflow
3036 TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
31- echo "Using triggered tag: ${{ github.ref_name }}"
3237 else
33- # Fallback to latest tag (for manual triggers)
3438 LATEST_TAG=$(git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-.*)?$' | head -n 1)
35- if [ -z "$LATEST_TAG" ]; then
36- echo "❌ No release tag found. Cannot determine version."
37- exit 1
38- fi
39+ [ -z "$LATEST_TAG" ] && { echo "No release tag found"; exit 1; }
3940 TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
4041 echo "Using latest tag: $LATEST_TAG"
4142 fi
4243 sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
43- echo "Updated server.json version to $TAG_VERSION"
44+ echo "Version: $TAG_VERSION"
4445
45- - name : Login to MCP Registry
46+ - name : Validate configuration
47+ run : |
48+ python3 -m json.tool server.json > /dev/null && echo "Configuration valid" || exit 1
49+
50+ - name : Login to MCP Registry (OIDC)
4651 run : ./mcp-publisher login github-oidc
4752
4853 - name : Publish to MCP Registry
0 commit comments