-
Notifications
You must be signed in to change notification settings - Fork 3
106 lines (87 loc) · 2.68 KB
/
build.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Flutter build
on: [ push, pull_request ]
permissions:
contents: read
jobs:
desktop:
name: Build desktop app
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: macos-latest
build-name: macos
- os: ubuntu-latest
build-name: linux
- os: windows-latest
build-name: windows
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.24.3
channel: stable
- name: Install extra apt dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libgtk-3-dev
- name: View Flutter status
run: |
flutter --version
flutter doctor -v
- name: Build desktop app
working-directory: app/resident_manager
run: flutter build ${{ matrix.build-name }}
- name: Upload macos build
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build-name }}-build
path: app/resident_manager/build/macos/Build/Products/Release
- name: Upload linux build
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build-name }}-build
path: app/resident_manager/build/linux/x64/release/bundle
- name: Upload windows build
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.build-name }}-build
path: app/resident_manager/build/windows/x64/runner/Release
apk:
name: Build APK
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: oracle
java-version: 19
- name: View Java status
run: java --version
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.24.3
channel: stable
- name: View Flutter status
run: |
flutter --version
flutter doctor -v
- name: Build APK
working-directory: app/resident_manager
run: flutter build apk
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: apk-build
path: app/resident_manager/build/app/outputs/flutter-apk