ci: add release workflow with AI-generated notes via YepAPI #3
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 β Lint & Health | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| ci: | |
| name: Node ${{ matrix.node }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node: ['18', '20', '22'] | |
| os: [ubuntu-latest] | |
| fail-fast: false | |
| steps: | |
| - name: β¬οΈ Checkout | |
| uses: actions/checkout@v4 | |
| - name: π’ Setup Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| - name: π¦ Install dependencies | |
| run: npm ci | |
| - name: β Syntax check β server.mjs | |
| run: node --check server.mjs | |
| - name: β Syntax check β bin/isotope CLI | |
| run: node --check bin/isotope || true | |
| - name: π Schema file sanity check | |
| run: | | |
| echo "=== isotope-complete.sql ===" | |
| echo "Size: $(wc -c < isotope-complete.sql) bytes" | |
| echo "Tables: $(grep -c 'CREATE TABLE' isotope-complete.sql)" | |
| echo "Functions: $(grep -c 'CREATE OR REPLACE FUNCTION' isotope-complete.sql)" | |
| echo "Policies: $(grep -c 'CREATE POLICY' isotope-complete.sql)" | |
| - name: π Verify no secrets in tracked files | |
| run: | | |
| # Fail if real API keys or service-role tokens are hardcoded | |
| if grep -rE 'service_role[_\s]?[=:]\s*eyJ|SUPABASE_SERVICE_ROLE_KEY\s*=\s*eyJ' --include="*.mjs" --include="*.js" --include="*.ts" .; then | |
| echo "β Hardcoded service-role key detected!" | |
| exit 1 | |
| fi | |
| echo "β No hardcoded secrets found" | |
| - name: π Check required files exist | |
| run: | | |
| for f in server.mjs package.json setup.sh setup.bat isotope-complete.sql .env.example; do | |
| test -f "$f" && echo "β $f" || (echo "β $f missing" && exit 1) | |
| done | |
| - name: π Smoke test β server starts and responds | |
| run: | | |
| SUPABASE_URL=https://placeholder.supabase.co \ | |
| SUPABASE_ANON_KEY=placeholder_anon_key \ | |
| PORT=3099 \ | |
| node server.mjs & | |
| SERVER_PID=$! | |
| sleep 3 | |
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3099/api/health || echo "000") | |
| kill $SERVER_PID 2>/dev/null || true | |
| echo "Health check response: $STATUS" | |
| # Accept 200 or 503 (healthy response even if Supabase unreachable) | |
| [ "$STATUS" = "200" ] || [ "$STATUS" = "503" ] || [ "$STATUS" = "500" ] && echo "β Server started" || (echo "β Server did not respond" && exit 1) |