name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build project
run: npm run clean:build
- name: Build Desktop Extension
run: npm run build:extension
- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/v')
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG=${GITHUB_REF#refs/tags/}
gh release create "$TAG" \
--title "Apple Dev MCP Server $TAG" \
apple-dev-mcp.dxt \
--notes "## Release $TAG
Apple Human Interface Guidelines MCP Server release.
### Installation
\`\`\`bash
# Desktop Extension (Recommended)
# Download apple-dev-mcp.dxt from GitHub releases
# Traditional NPM
npm install -g apple-dev-mcp@$TAG
\`\`\`
### Usage
\`\`\`bash
# Test the server
npx @modelcontextprotocol/inspector apple-dev-mcp
\`\`\`
### Features
- 🔍 Smart search across Apple's design guidelines
- 📱 Multi-platform support (iOS, macOS, watchOS, tvOS, visionOS)
- 🔄 Intelligent caching with graceful degradation
- 🤖 AI-friendly markdown output
See the [README](https://github.com/${{ github.repository }}#readme) for full documentation."
- name: Notify release completion
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
run: |
TAG=${GITHUB_REF#refs/tags/}
echo "🎉 Successfully released Apple HIG MCP Server $TAG"
echo "📦 NPM: https://www.npmjs.com/package/apple-dev-mcp"
echo "🏷️ GitHub: https://github.com/${{ github.repository }}/releases/tag/$TAG"