fix: correct workflow paths for project root #2
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 Python IDE APK | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Clone Flutter SDK | |
| run: | | |
| cd $HOME | |
| git clone --depth 1 --branch stable https://github.com/flutter/flutter.git | |
| echo "$HOME/flutter/bin" >> $GITHUB_PATH | |
| - name: Setup Flutter | |
| run: | | |
| flutter --version | |
| flutter config --no-analytics | |
| flutter precache | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-flutter- | |
| ${{ runner.os }}- | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Run static analysis | |
| run: flutter analyze --no-fatal-infos --no-fatal-warnings | |
| - name: Build debug APK | |
| run: flutter build apk --debug | |
| - name: Build release APK | |
| run: flutter build apk --release | |
| - name: Upload debug APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debug-apk | |
| path: build/app/outputs/flutter-apk/app-debug.apk | |
| retention-days: 7 | |
| - name: Upload release APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-apk | |
| path: build/app/outputs/flutter-apk/app-release.apk | |
| retention-days: 30 | |
| - name: Upload build logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-logs | |
| path: | | |
| build/logs/ | |
| android/.gradle/**/*.log | |
| retention-days: 7 |