Skip to content

FEATURE: support workflow and ai toolsets #125

FEATURE: support workflow and ai toolsets

FEATURE: support workflow and ai toolsets #125

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
pnpm:
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 --frozen-lockfile
- run: pnpm typecheck
- run: pnpm build
- name: Assert compiled test inventory
run: test "$(find dist/test -name '*.test.js' | wc -l)" -ge 20
- run: pnpm test
- run: pnpm lint
- run: pnpm audit --prod --audit-level=high
- run: npm pack --dry-run
- name: Smoke-test CLI metadata
run: |
node dist/index.js --version
node dist/index.js --help >/dev/null
npm-compatibility:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: "24"
cache: npm
- run: npm ci --ignore-scripts
- run: npm run typecheck
- run: npm run build
- name: Assert compiled test inventory
run: test "$(find dist/test -name '*.test.js' | wc -l)" -ge 20
- run: npm test
- run: npm audit --omit=dev --audit-level=high
- run: npm pack --dry-run
- name: Smoke-test CLI metadata
run: |
node dist/index.js --version
node dist/index.js --help >/dev/null
publish:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [pnpm, npm-compatibility]
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 --frozen-lockfile
- 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