Skip to content

Update main.yml

Update main.yml #47

Workflow file for this run

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
- run: flutter pub get || true
- 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: Set up C++ compiler
working-directory: example
run: sudo apt-get install g++-9
- name: Install Ninja
run: sudo apt-get install ninja-build
- name: Set up C++ compiler and Make
run: |
sudo apt-get install g++-9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
sudo apt-get install make
- name: Create linux build
working-directory: example
run: flutter build linux --release
# - 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