no downloads #102
This file contains 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: Flutter CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 12 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '12.x' | |
distribution: 'adopt' | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: 'beta' | |
- name: Create new Flutter project | |
run: | | |
flutter create -t app new_project | |
rsync -av --exclude='new_project' . new_project/ | |
cd new_project | |
- name: Update dependencies | |
run: | | |
cd new_project | |
flutter pub upgrade | |
flutter pub outdated | |
- name: Get Flutter dependencies | |
run: cd new_project && flutter pub get | |
- name: Check for outdated packages | |
run: cd new_project && flutter pub outdated | |
- name: Clean build directory | |
run: cd new_project && flutter clean | |
- name: Build debug APK | |
run: cd new_project && flutter build apk --debug | |
- name: Upload debug APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: debug-apk | |
path: new_project/build/app/outputs/flutter-apk/app-debug.apk | |
- name: Display structure of files | |
run: ls -R new_project/build/app/outputs/flutter-apk |