feat: Add Android example for configurable widgets #37
Workflow file for this run
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: Build Android Examples | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| paths: | |
| - 'packages/home_widget/lib/**' | |
| - 'packages/home_widget/android/**' | |
| - 'examples/**' | |
| - 'packages/home_widget/example/**' | |
| - '.github/workflows/build-android-examples.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| discover-examples: | |
| name: Discover Android Examples | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - uses: bluefireteam/melos-action@v3 | |
| - name: Discover Android examples | |
| id: set-matrix | |
| run: | | |
| examples=$(melos list --dir-exists="android" --ignore="home_widget" --json | jq -r '.[].name' | jq -R -s -c 'split("\n") | map(select(. != ""))') | |
| echo "matrix={\"example\":$examples}" >> $GITHUB_OUTPUT | |
| build-examples: | |
| name: Build Android Examples | |
| needs: discover-examples | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: ${{ fromJson(needs.discover-examples.outputs.matrix) }} | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Free Disk Space (Ubuntu) | |
| uses: AdityaGarg8/remove-unwanted-software@v5 | |
| with: | |
| remove-dotnet: true | |
| remove-haskell: true | |
| remove-codeql: true | |
| remove-docker-images: true | |
| - uses: bluefireteam/melos-action@v3 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Build Android Example | |
| env: | |
| MELOS_PACKAGES: ${{ matrix.example }} | |
| run: melos run build:android:examples --no-select | |