Es 19467/expose mcp node as ai tool #12
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: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| version-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Ensure version is newer than latest tag | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| current="v$(node -p "require('./package.json').version")" | |
| latest="$(git describe --tags --abbrev=0 2>/dev/null || echo 'v0.0.0')" | |
| echo "package.json → $current" | |
| echo "git tags → $latest" | |
| if [ "$current" = "$latest" ]; then | |
| echo "::error::Tag $current already exists — bump the version" | |
| exit 1 | |
| fi | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: version-check | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Upload dist artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| retention-days: 7 | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| release: | |
| if: github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| - lint | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Tag release | |
| run: | | |
| version="v$(node -p "require('./package.json').version")" | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git tag "$version" | |
| git push --tags | |