Big Changes + Refactoring #3
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
flutter_channel: [stable] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install CMake and Ninja | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y cmake ninja-build | |
- name: Install GTK and pkg-config (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install -y libgtk-3-dev pkg-config | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.16.5' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build Web | |
if: matrix.os == 'ubuntu-latest' | |
run: flutter build web | |
- name: Upload Web Artifact | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: web-build | |
path: app/build/web | |
- name: Build Android | |
if: matrix.os == 'ubuntu-latest' | |
run: flutter build apk | |
- name: Upload Android Artifact | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: android-apk | |
path: app/build/app/outputs/flutter-apk/app-release.apk | |
- name: Build Windows | |
if: matrix.os == 'windows-latest' | |
run: flutter build windows | |
- name: Upload Windows Artifact | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-build | |
path: app/build/windows/runner/Release | |
- name: Build Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: flutter build linux | |
- name: Upload Linux Artifact | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-build | |
path: app/build/linux/x64/release/bundle |