-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01ade8c
commit f802603
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
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 |