FEATURE: support workflow and ai toolsets #118
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - run: pnpm install | |
| - run: pnpm typecheck | |
| - run: pnpm build | |
| - run: pnpm test | |
| publish: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| cache: pnpm | |
| - run: pnpm install | |
| - name: Create and push git tag | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| if git ls-remote --tags origin | grep -q "refs/tags/v${VERSION}$"; then | |
| echo "Tag v${VERSION} already exists, skipping" | |
| else | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag -a "v${VERSION}" -m "Release v${VERSION}" | |
| git push origin "v${VERSION}" | |
| fi | |
| - name: Publish package | |
| run: pnpm publish -r --no-git-checks || echo "Version already published, skipping" | |
| - name: Install mcp-publisher | |
| run: | | |
| curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher | |
| - name: Sync server.json version from package.json | |
| run: | | |
| VERSION=$(node -p "require('./package.json').version") | |
| node -e "const fs = require('fs'); const s = JSON.parse(fs.readFileSync('server.json')); s.version = '$VERSION'; s.packages[0].version = '$VERSION'; fs.writeFileSync('server.json', JSON.stringify(s, null, 2) + '\n')" | |
| - name: Publish server to MCP Registry | |
| run: | | |
| ./mcp-publisher login github-oidc | |
| ./mcp-publisher publish |