@@ -16,33 +16,38 @@ jobs:
16
16
- name : Checkout code
17
17
uses : actions/checkout@v5
18
18
19
+ - name : Setup Go
20
+ uses : actions/setup-go@v5
21
+ with :
22
+ go-version : " stable"
23
+
19
24
- name : Fetch tags
20
25
run : git fetch --tags
21
26
22
27
- name : Install MCP Publisher
23
28
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
25
32
26
33
- name : Update server.json version
27
34
run : |
28
35
if [[ "${{ github.ref_type }}" == "tag" ]]; then
29
- # Use the tag that triggered the workflow
30
36
TAG_VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
31
- echo "Using triggered tag: ${{ github.ref_name }}"
32
37
else
33
- # Fallback to latest tag (for manual triggers)
34
38
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; }
39
40
TAG_VERSION=$(echo "$LATEST_TAG" | sed 's/^v//')
40
41
echo "Using latest tag: $LATEST_TAG"
41
42
fi
42
43
sed -i "s/\${VERSION}/$TAG_VERSION/g" server.json
43
- echo "Updated server.json version to $TAG_VERSION"
44
+ echo "Version: $TAG_VERSION"
44
45
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)
46
51
run : ./mcp-publisher login github-oidc
47
52
48
53
- name : Publish to MCP Registry
0 commit comments