✨ feat(ponytail): add lazy senior dev mode commands and hooks #30
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/CD | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| validate: | |
| name: Validate Configuration | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Validate opencode.json + agents + skills | |
| run: node bin/commands/validate.mjs --verbose | |
| - name: Check migration system integrity | |
| run: node bin/commands/check-migrations.mjs | |
| lint: | |
| name: Lint & Format | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Check formatting | |
| run: npx prettier --check 'bin/**/*.mjs' '*.md' '*.json' | |
| - name: ESLint | |
| run: npx eslint bin/ --ext .mjs,.js | |
| publish: | |
| name: Publish to npm | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [validate, lint] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org | |
| - name: Install dependencies | |
| run: npm ci --ignore-scripts | |
| - name: Generate template/ for publish | |
| run: bash scripts/generate-template.sh | |
| - name: Pre-publish validation | |
| run: | | |
| node -e " | |
| const fs = require('fs'); | |
| const checks = [ | |
| 'template/.opencode/agents', | |
| 'template/.opencode/skills', | |
| 'template/.opencode/commands', | |
| 'template/opencode.json', | |
| ]; | |
| let ok = true; | |
| for (const c of checks) { | |
| if (!fs.existsSync(c)) { | |
| console.error('Missing in template:', c); | |
| ok = false; | |
| } | |
| } | |
| if (ok) console.log('✓ Pre-publish template validation passed'); | |
| else process.exit(1); | |
| " | |
| - run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Post-publish version check | |
| run: | | |
| PUBLISHED=$(npm view opencode-agent-kit version) | |
| echo "Published: v$PUBLISHED" |