Update main.yml #39
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 Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
if: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout out source code | |
uses: actions/checkout@v3 | |
- name: Install Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '18' | |
distribution: 'adopt' | |
cache: gradle | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.2' | |
channel: 'stable' | |
cache: 'flutter' | |
- name: Check Flutter Version | |
run: flutter doctor --verbose & flutter --disable-telemetry | |
- name: Install dependencies example app | |
working-directory: example | |
run: flutter clean && flutter pub get | |
- name: Install dependencies | |
run: flutter clean && flutter pub get|| true | |
- name: Init Multi Platform | |
working-directory: example | |
run: flutter create . | |
# - name: Create android APK | |
# working-directory: example | |
# run: flutter build apk --profile | |
# | |
# - name: Move apk to Download folder | |
# run: mv example/build/app/outputs/flutter-apk/app-profile.apk download/app-profile.apk | |
- name: Create linux build | |
working-directory: example | |
run: flutter build linux --profile | |
# - name: Move linux install to download folder | |
# run: mv example/build/linux/release/bundle download/linux | |
# - name: Create web build | |
# working-directory: example | |
# run: flutter build web --release | |
# | |
# - name: Commit folder example/build/web to https://github.com/quocbao238/flutter_m3_core_webview | |
# run: | | |
# set -e | |
# git config --global user.email "baobondev@gmail.com" | |
# git config --global user.name "baobui" | |
# git clone https://github.com/quocbao238/flutter_m3_core_webview | |
# cd flutter_m3_core_webview | |
# git rm -rf * | |
# cp -r ../example/build/web/* . | |
# git add . | |
# git commit -m "Update web build" | |
# git push origin main | |