Skip to content

feat: add MCP Registry compliance fields #5

feat: add MCP Registry compliance fields

feat: add MCP Registry compliance fields #5

name: Version and Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
version:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.changed.outputs.changed }}
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 'lts/*'
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
id: bump
run: |
bash scripts/bump-version.sh
- name: Get new version
id: version
run: |
NEW_VERSION=$(node -p "require('./package.json').version")
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "New version: $NEW_VERSION"
- name: Check if version changed
id: changed
run: |
if git diff --quiet package.json; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No version change detected"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "Version changed detected"
fi
- name: Commit version bump
if: steps.changed.outputs.changed == 'true'
run: |
git add package.json package-lock.json server.json
git commit -m "chore: bump version to ${{ steps.version.outputs.version }}"
git push origin main
- name: Create and push tag
if: steps.changed.outputs.changed == 'true'
run: |
git tag -a "v${{ steps.version.outputs.version }}" -m "Release v${{ steps.version.outputs.version }}"
git push origin "v${{ steps.version.outputs.version }}"
- name: Create GitHub Release
if: steps.changed.outputs.changed == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Generate release notes from commits
LAST_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -z "$LAST_TAG" ]; then
COMMITS=$(git log --pretty=format:"- %s (%h)" HEAD^..HEAD)
else
COMMITS=$(git log --pretty=format:"- %s (%h)" "$LAST_TAG"..HEAD^)
fi
# Create release
gh release create "v${{ steps.version.outputs.version }}" \
--title "v${{ steps.version.outputs.version }}" \
--notes "## Changes
$COMMITS"
publish:
runs-on: ubuntu-latest
needs: version
if: needs.version.outputs.changed == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: v${{ needs.version.outputs.version }}
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Run type check
run: npm run type-check
- name: Install MCP Publisher
run: |
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
RELEASE_TAG=$(curl -s https://api.github.com/repos/modelcontextprotocol/registry/releases | \
jq -r '.[] | select(.assets | map(.name) | any(test("mcp-publisher_"))) | .tag_name' | head -1)
echo "Downloading mcp-publisher ${RELEASE_TAG} for ${OS}_${ARCH}"
curl -fL "https://github.com/modelcontextprotocol/registry/releases/download/${RELEASE_TAG}/mcp-publisher_${OS}_${ARCH}.tar.gz" | tar xz
chmod +x mcp-publisher
- name: Login to MCP Registry
env:
MCP_PRIVATE_KEY: ${{ secrets.MCP_PRIVATE_KEY }}
run: ./mcp-publisher login dns --domain docusign-navigator.thisdot.co --private-key "$MCP_PRIVATE_KEY"
- name: Publish to MCP Registry
run: ./mcp-publisher publish