Add PR close/merge notifications #39
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: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run lint | |
| - run: npm test | |
| - run: npm run build | |
| - name: Check dist is up to date | |
| run: git diff --exit-code dist/ || (echo "dist/ is out of date. Run 'npm run build' and commit." && exit 1) | |
| - name: Check version consistency | |
| run: | | |
| PKG=$(node -p "require('./package.json').version") | |
| PLUGIN=$(node -p "require('./.claude-plugin/plugin.json').version") | |
| MCP=$(node -p "require('fs').readFileSync('src/channel.ts','utf8').match(/version: \"([^\"]+)\"/)[1]") | |
| echo "package.json: $PKG" | |
| echo "plugin.json: $PLUGIN" | |
| echo "channel.ts: $MCP" | |
| if [ "$PKG" != "$PLUGIN" ] || [ "$PKG" != "$MCP" ]; then | |
| echo "Version mismatch! All three must match." | |
| exit 1 | |
| fi |