.github: upload bundle analysis as part of premerge #599
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: "premerge" | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Lint | |
| run: npm run lint:check | |
| working-directory: ./plugin | |
| - name: Check | |
| run: npm run check | |
| working-directory: ./plugin | |
| - name: Generate files | |
| run: npm run gen | |
| working-directory: ./scripts | |
| - name: Check for generated file changes | |
| run: | | |
| git add -A | |
| if git diff --staged --quiet; then | |
| echo "✅ No changes detected in generated files" | |
| else | |
| echo "❌ Generated files have changed. Please commit these changes:" | |
| git diff --staged | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: VITE_BUNDLE_ANALYZER_MODE=static npm run build | |
| working-directory: ./plugin | |
| - name: Test | |
| run: npm run test | |
| working-directory: ./plugin | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: Bundle analysis | |
| path: ./plugin/dist/stats.html | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Build | |
| run: npm run build | |
| working-directory: ./docs |