-
-
Notifications
You must be signed in to change notification settings - Fork 35
143 lines (135 loc) · 4.06 KB
/
build-app.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Build APP
# manual and on push
on:
workflow_dispatch:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-latest
outputs:
found: ${{ steps.PR.outputs.pr_found }}
steps:
- uses: 8BitJonny/[email protected]
id: PR
build-android:
needs: check
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./chameleonultragui
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '21'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build apk --build-number ${{ github.run_number }}
- uses: actions/upload-artifact@v3
with:
name: apk
path: chameleonultragui/build/app/outputs/flutter-apk/app-release.apk
build-windows:
needs: check
runs-on: windows-latest
defaults:
run:
working-directory: ./chameleonultragui
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter config --enable-windows-desktop
- run: flutter build windows --build-number ${{ github.run_number }}
- run: flutter test
- uses: actions/upload-artifact@v3
with:
name: windows
path: chameleonultragui/build/windows/x64/runner/Release/
- name: Create NSIS installer
uses: joncloud/makensis-action@v4
with:
script-file: nsis-installer.nsi
- uses: actions/upload-artifact@v3
with:
name: windows-installer
path: chameleonultragui-setup-win.exe
build-linux:
needs: check
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./chameleonultragui
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: sudo apt-get update -y && sudo apt-get install -y ninja-build libgtk-3-dev clang
- run: flutter config --enable-linux-desktop
- run: flutter build linux --build-number ${{ github.run_number }}
- run: flutter test
- uses: actions/upload-artifact@v3
with:
name: linux
path: chameleonultragui/build/linux/x64/release
- run: dart pub global activate flutter_to_debian
- run: flutter_to_debian
- uses: actions/upload-artifact@v3
with:
name: linux-debian
path: chameleonultragui/build/linux/x64/release/debian
build-linux-legacy:
needs: check
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./chameleonultragui
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: sudo apt-get update -y && sudo apt-get install -y ninja-build libgtk-3-dev clang
- run: flutter config --enable-linux-desktop
- run: flutter build linux --build-number ${{ github.run_number }}
- run: flutter test
- uses: actions/upload-artifact@v3
with:
name: linux-legacy
path: chameleonultragui/build/linux/x64/release
build-macos:
needs: check
runs-on: macos-13
defaults:
run:
working-directory: ./chameleonultragui
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Enable macOS
run: flutter config --enable-macos-desktop
- name: Install tools
run: brew install automake libtool create-dmg
- run: flutter build macos --release
build-ios:
needs: check
runs-on: macos-13
defaults:
run:
working-directory: ./chameleonultragui
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install tools
run: brew install automake libtool create-dmg
- run: flutter build ios --release 2>&1 | tee /dev/tty | grep -q "Xcode build done" && exit 0 || exit 1