-
Notifications
You must be signed in to change notification settings - Fork 91
185 lines (143 loc) · 5.36 KB
/
main.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
name: "BUILD"
on:
workflow_dispatch:
jobs:
build_on_macos:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Install Flutter Dependency
run: flutter pub get
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Flutter build ios
run: |
flutter build ios --release --no-codesign --verbose
chmod 777 unbitcode.sh
sh unbitcode.sh
mkdir -p Payload
mv ./build/ios/iphoneos/Runner.app Payload
zip -r -y Payload.zip Payload/Runner.app
mv Payload.zip AppRhyme.ipa
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: AppRhyme.ipa
path: AppRhyme.ipa
compression-level: 9
- name: Flutter build macos
run: flutter build macos --release --verbose
- name: Upload Macos app
uses: actions/upload-artifact@v4
with:
name: AppRhyme-macos-release-unknown.zip
path: build/macos/Build/Products/Release/*.app
- name: Install tree
run: brew install tree
- name: Print directory tree
run: tree build/macos/Build/Products/
- name: Package Executable
run:
mkdir -p build/app/
zip -r "build/app/AppRhyme-macos-release-unknown.zip" "build/macos/Build/Products/Release/AppRhyme.app"
build_on_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Install Flutter Dependency
run: flutter pub get
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Linux dependency
run: |
sudo apt-get update -y
sudo apt install libwebkit2gtk-4.1-dev
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install libasound2-dev
- name: Flutter build linux
run: flutter build linux --release --verbose
- name: Package Executable
run: 7z a -r "../../../../../build/app/AppRhyme-linux-release-amd64.zip" *
working-directory: build/linux/x64/release/bundle
- name: Upload Linux app
uses: actions/upload-artifact@v4
with:
name: AppRhyme-linux-release-amd64
path: build/app/AppRhyme-linux-release-amd64.zip
build_on_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: "beta"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Install Flutter Dependency
run: flutter pub get
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Cargo-Ndk
run: cargo install cargo-ndk --version 2.11.0 --force
- name: Install android ndk
uses: nttld/setup-ndk@v1
id: install-ndk
with:
ndk-version: r22b
- name: Flutter build windows
run: flutter build windows --release --verbose
- name: Package Executable
run: 7z a -r -sse "..\..\..\..\..\build\app\AppRhyme-win-release-amd64.zip" *
working-directory: build\windows\x64\runner\Release
- name: Upload files
uses: actions/upload-artifact@v4
with:
name: AppRhyme-win-release-amd64
path: build/app/AppRhyme-win-release-amd64.zip
- name: Flutter build apk abi
run: flutter build apk --release --split-per-abi --verbose
- name: Flutter build apk
run: flutter build apk --release --verbose
- name: Upload APK1
uses: actions/upload-artifact@v4
with:
name: AppRhyme-arm64-v8a-release.apk
path: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
compression-level: 9
- name: Upload APK2
uses: actions/upload-artifact@v4
with:
name: AppRhyme-armeabi-v7a-release.apk
path: build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
compression-level: 9
- name: Upload APK3
uses: actions/upload-artifact@v4
with:
name: AppRhyme-x86_64-release.apk
path: build/app/outputs/flutter-apk/app-x86_64-release.apk
compression-level: 9
- name: Upload APK4
uses: actions/upload-artifact@v4
with:
name: AppRhyme-unknown-release.apk
path: build/app/outputs/flutter-apk/app-release.apk
compression-level: 9
- name: Rename APKs
run: |
mv build/app/outputs/flutter-apk/app-arm64-v8a-release.apk build/app/outputs/flutter-apk/AppRhyme-arm64-v8a-release.apk
mv build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk build/app/outputs/flutter-apk/AppRhyme-armeabi-v7a-release.apk
mv build/app/outputs/flutter-apk/app-x86_64-release.apk build/app/outputs/flutter-apk/AppRhyme-x86_64-release.apk
mv build/app/outputs/flutter-apk/app-release.apk build/app/outputs/flutter-apk/AppRhyme-unknown-release.apk