-
Notifications
You must be signed in to change notification settings - Fork 27
163 lines (120 loc) · 4.63 KB
/
build-all-platforms.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
name: Build all app at once
on: workflow_dispatch
jobs:
build-linux-deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.22.2'
- name: Clone project
run: git clone https://github.com/anandnet/Harmony-Music.git
- name: Flutter doctor
run: flutter doctor
- name: Install project dependencies
working-directory: ./Harmony-Music
run: flutter pub get
- name: Update lang data
working-directory: ./Harmony-Music
run: dart localization/generator.dart
- name: Set update check flag to true
working-directory: ./Harmony-Music/lib/utils
run: echo "const updateCheckFlag = true;" > update_check_flag_file.dart
- name: install required deps for linux package
run: |
sudo apt-get install libmpv-dev mpv libayatana-appindicator3-dev ninja-build libgtk-3-dev
- name: Flutter doctor
run: flutter doctor
- name: Build linux deb package
working-directory: ./Harmony-Music
run: |
dart pub global activate flutter_distributor
flutter_distributor package --platform linux --targets deb
- name: Upload linux deb artifact
uses: actions/upload-artifact@v4
with:
name: Harmony music linux deb
path: ./Harmony-Music/dist/*
build-android-apk-and-windows-exe:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.22.2'
- uses: actions/setup-java@v4
with:
distribution: 'microsoft'
java-version: '11'
- name: Clone project
run: git clone https://github.com/anandnet/Harmony-Music.git
- name: Flutter doctor
run: flutter doctor
- name: Install project dependencies
working-directory: ./Harmony-Music
run: flutter pub get
- name: Update lang data
working-directory: ./Harmony-Music
run: dart localization/generator.dart
- name: Set update check flag to true
working-directory: ./Harmony-Music/lib/utils
run: echo "const updateCheckFlag = true;" > update_check_flag_file.dart
- name: Build android apk
working-directory: ./Harmony-Music
run: |
flutter build apk --split-per-abi --release
flutter build apk
- name: Upload apk artifact
uses: actions/upload-artifact@v4
with:
name: Harmony music apk
path: ./Harmony-Music/build/app/outputs/flutter-apk/*apk
- name: Build windows exe package
working-directory: ./Harmony-Music
run: |
dart pub global activate flutter_distributor
flutter_distributor package --platform windows --targets exe
- name: Upload Windows exe artifact
uses: actions/upload-artifact@v4
with:
name: Harmony music windows exe
path: ./Harmony-Music/dist/*
build-ios-ipa:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: '3.22.2'
- name: Clone project
run: git clone https://github.com/anandnet/Harmony-Music.git
- name: Flutter doctor
run: flutter doctor
- name: Install project dependencies
working-directory: ./Harmony-Music
run: flutter pub get
- name: Update lang data
working-directory: ./Harmony-Music
run: dart localization/generator.dart
- name: Set update check flag to true
working-directory: ./Harmony-Music/lib/utils
run: echo "const updateCheckFlag = true;" > update_check_flag_file.dart
- name: release ios package
working-directory: ./Harmony-Music
run: flutter build ios --release --no-codesign
- run: mkdir Payload
working-directory: ./Harmony-Music/build/ios/iphoneos
- run: mv Runner.app/ Payload
working-directory: ./Harmony-Music/build/ios/iphoneos
- name: Zip output
run: zip -qq -r -9 harmonymusic.ipa Payload
working-directory: ./Harmony-Music/build/ios/iphoneos
- name: Upload ios ipa artifact
uses: actions/upload-artifact@v4
with:
name: Harmony music ios ipa
path: ./Harmony-Music/build/ios/iphoneos/harmonymusic.ipa