-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (71 loc) · 2.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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: Install Unwind (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libunwind-dev
- name: Install GStreamer (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
- 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