4
4
release :
5
5
types : [ published ]
6
6
7
- env :
8
- FLUTTER_DEBUG_INFO_PATH : build/app/outputs/symbols
9
-
10
7
jobs :
11
8
security_hardening :
12
9
name : Check security hardening
@@ -101,17 +98,16 @@ jobs:
101
98
include :
102
99
- os : ubuntu-latest
103
100
file : apk
104
- build-file-path : code/build/app/outputs/flutter-apk/app-release.apk
105
101
asset-content-type : application/java-archive
106
102
- os : ubuntu-latest
107
103
file : aab
108
- build-file-path : code/build/app/outputs/bundle/release/app-release.aab
109
104
asset-content-type : application/zip
110
105
- os : macos-latest
111
106
file : ipa
112
- build-file-path : code/build/ios/iphoneos/Runner.app
113
- asset-content-type : inode/directory
107
+ asset-content-type : application/octet-stream
114
108
fail-fast : false
109
+ env :
110
+ FLUTTER_DEBUG_INFO_PATH : build/app/outputs/symbols
115
111
steps :
116
112
- name : Check matrix
117
113
if : ${{ !(matrix.file == 'apk' && github.event.release.prerelease) || ((matrix.file == 'aab' || matrix.file == 'ipa') && !github.event.release.prerelease) }}
@@ -174,13 +170,19 @@ jobs:
174
170
# apk
175
171
- name : Build an Android APK file
176
172
if : matrix.file == 'apk'
177
- run : flutter build apk --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH
173
+ run : |
174
+ flutter build apk --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH
175
+ mv build/app/outputs/flutter-apk/app-release.apk app.apk
176
+ mv code/build/app/outputs/mapping/release/mapping.txt apk-mapping.txt
178
177
working-directory : code
179
178
180
179
# aab
181
180
- name : Build an Android App Bundle file
182
181
if : matrix.file == 'aab'
183
- run : flutter build appbundle --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH
182
+ run : |
183
+ flutter build appbundle --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH
184
+ mv code/build/app/outputs/bundle/release/app-release.aab app.aab
185
+ mv code/build/app/outputs/mapping/release/mapping.txt aab-mapping.txt
184
186
working-directory : code
185
187
186
188
# apk/aab
@@ -189,13 +191,13 @@ jobs:
189
191
uses : actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b # v2.2.1
190
192
with :
191
193
name : ${{ matrix.file }}-mapping.txt
192
- path : code/build/app/outputs/mapping/release/ mapping.txt
194
+ path : ${{ matrix.file }}- mapping.txt
193
195
- name : Upload the release assets — ${{ matrix.file }}-mapping.txt file
194
196
if : matrix.file == 'apk' || matrix.file == 'aab'
195
197
uses : actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
196
198
with :
197
199
upload_url : ${{ github.event.release.upload_url }}
198
- asset_path : code/build/app/outputs/mapping/release/ mapping.txt
200
+ asset_path : ${{ matrix.file }}- mapping.txt
199
201
asset_name : ${{ matrix.file }}-mapping.txt
200
202
asset_content_type : text/plain
201
203
env :
@@ -207,6 +209,7 @@ jobs:
207
209
run : |
208
210
flutter build ios --no-codesign --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH
209
211
echo "::warning::TODO: fastlane export_ipa"
212
+ echo "TODO: mv code/build/app/outputs/ipa/app.ipa app.ipa"
210
213
working-directory : code
211
214
212
215
# all
@@ -232,6 +235,7 @@ jobs:
232
235
with :
233
236
name : app.${{ matrix.file }}
234
237
path : ${{ matrix.build-file-path }}
238
+ if-no-files-found : error
235
239
- name : Upload the release assets — ${{ matrix.file }} file
236
240
uses : actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
237
241
with :
0 commit comments