← Files SocialBuARCHIVED FILE
.github/workflows/validate.yml
2.66 KB · Nov 3, 2026 · 18:53 UTC
name: Validate agent package
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
workflow_call:
inputs:
ref:
type: string
required: false
default: ""
release_tag:
type: string
required: false
default: ""
live:
type: boolean
required: false
default: false
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.ref }}
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
- name: Validate package
env:
RELEASE_TAG: ${{ inputs.release_tag }}
VALIDATE_LIVE: ${{ inputs.live }}
run: |
args=()
if [[ "$VALIDATE_LIVE" == "true" ]]; then args+=(--live); fi
python scripts/validate.py "${args[@]}"
if [[ -f scripts/test_validate.py ]]; then python scripts/test_validate.py; fi
if [[ -n "$RELEASE_TAG" ]]; then
test "$(git rev-parse HEAD)" = "$(git rev-parse --verify "refs/tags/$RELEASE_TAG^{commit}")"
version=$(python -c 'import json; print(json.load(open("plugin.json"))["version"])')
if [[ "$RELEASE_TAG" != "v$version" ]]; then
echo "Release tag $RELEASE_TAG does not match manifest version $version."
exit 1
fi
fi
- name: Check release guards when present in the tag
run: |
if [[ -f scripts/test_release.py ]]; then python scripts/test_release.py; fi
- run: pip install check-jsonschema==0.38.0
- run: check-jsonschema --schemafile https://agent-plugins.org/schemas/1.0.0/plugin.schema.json plugin.json
- run: check-jsonschema --schemafile https://agent-plugins.org/schemas/1.0.0/mcp.schema.json mcp.json
- run: check-jsonschema --schemafile https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json server.json
- name: Install MCP Registry publisher
env:
MCP_PUBLISHER_VERSION: "1.8.1"
MCP_PUBLISHER_SHA256: "a06c9096dcb9727c13555b6be26c7effa707b01f06a4c561ba7a3635443cf2cc"
run: |
curl -fsSLo mcp-publisher.tar.gz "https://github.com/modelcontextprotocol/registry/releases/download/v${MCP_PUBLISHER_VERSION}/mcp-publisher_linux_amd64.tar.gz"
echo "${MCP_PUBLISHER_SHA256} mcp-publisher.tar.gz" | sha256sum -c -
tar -xzf mcp-publisher.tar.gz mcp-publisher
- run: ./mcp-publisher validate
SHA-256: c3cdfaa439d4fbec9449e4ad780dad4df411e9ebde0a47cb26350ce19ee64ec9