Harden API stability, tests, docs, and notices #28
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: Deploy Workers Static Assets | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: workers-static-assets-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| # Keep this pinned until Dart 3 and current Flutter compatibility are handled separately. | |
| FLUTTER_VERSION: "3.7.12" | |
| jobs: | |
| build-and-deploy: | |
| name: Build and deploy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| channel: stable | |
| cache: true | |
| - name: Enable Flutter web | |
| run: flutter config --enable-web | |
| - name: Install package dependencies | |
| run: flutter pub get | |
| - name: Install example dependencies | |
| run: flutter pub get | |
| working-directory: example | |
| - name: Build example web | |
| run: flutter build web --release | |
| working-directory: example | |
| - name: Deploy to Cloudflare Workers | |
| if: github.event_name != 'pull_request' | |
| uses: cloudflare/wrangler-action@v4 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| wranglerVersion: "4" | |
| command: deploy |