New Crowdin updates #255
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 | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| android: ${{ steps.filter.outputs.android }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| android: | |
| - 'android/**' | |
| - 'assets/**' | |
| - 'lib/**' | |
| - 'pubspec.yaml' | |
| Android: | |
| needs: changes | |
| if: ${{ needs.changes.outputs.android == 'true' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.FLUTTER_VERSION }} | |
| - name: Cache Pub Packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.pub-cache | |
| key: ubuntu-pub-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ubuntu-pub- | |
| - name: Cache build_runner (Optional) | |
| uses: actions/cache@v3 | |
| with: | |
| path: .dart_tool/build | |
| key: ubuntu-build-runner-${{ hashFiles('**/*.dart') }} | |
| restore-keys: | | |
| ubuntu-build-runner- | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Prebuild with build_runner | |
| run: dart run build_runner build --delete-conflicting-outputs | |
| - name: Build apk | |
| run: | | |
| flutter build apk --debug | |
| # flutter build aab --debug | |
| - name: Upload (apk) Artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: "DPIP.apk" | |
| path: build/app/outputs/flutter-apk/*.apk | |
| - name: Upload (aab) Artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: "DPIP.aab" | |
| path: build/app/outputs/bundle/release/*.aab |