Prepare release #8
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: Extensions | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - "extensions/**" | |
| - "src/features/extensions/**" | |
| - ".github/workflows/extensions.yml" | |
| pull_request: | |
| paths: | |
| - "extensions/**" | |
| - "src/features/extensions/**" | |
| - ".github/workflows/extensions.yml" | |
| workflow_dispatch: | |
| jobs: | |
| validate: | |
| if: github.repository == 'athasdev/athas' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.2 | |
| - name: Prepare generated extension CDN output | |
| run: bun run extensions:prepare | |
| - name: Validate extensions | |
| run: bun run extensions:validate | |
| - name: Check generated source changes | |
| run: | | |
| git diff --exit-code extensions src/features/extensions package.json .gitignore || ( | |
| echo "Extension source or generated metadata changed. Run the extension scripts locally." | |
| exit 1 | |
| ) | |
| deploy: | |
| if: github.repository == 'athasdev/athas' && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') | |
| needs: validate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.2 | |
| - name: Prepare generated extension CDN output | |
| run: bun run extensions:prepare | |
| - name: Deploy extensions CDN | |
| env: | |
| EXTENSIONS_CDN_ROOT: ${{ secrets.EXTENSIONS_CDN_ROOT }} | |
| run: bun run extensions:deploy |