44 release :
55 types : [ published ]
66
7- env :
8- FLUTTER_DEBUG_INFO_PATH : build/app/outputs/symbols
9-
107jobs :
118 security_hardening :
129 name : Check security hardening
@@ -101,17 +98,16 @@ jobs:
10198 include :
10299 - os : ubuntu-latest
103100 file : apk
104- build-file-path : code/build/app/outputs/flutter-apk/app-release.apk
105101 asset-content-type : application/java-archive
106102 - os : ubuntu-latest
107103 file : aab
108- build-file-path : code/build/app/outputs/bundle/release/app-release.aab
109104 asset-content-type : application/zip
110105 - os : macos-latest
111106 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
114108 fail-fast : false
109+ env :
110+ FLUTTER_DEBUG_INFO_PATH : build/app/outputs/symbols
115111 steps :
116112 - name : Check matrix
117113 if : ${{ !(matrix.file == 'apk' && github.event.release.prerelease) || ((matrix.file == 'aab' || matrix.file == 'ipa') && !github.event.release.prerelease) }}
@@ -174,13 +170,19 @@ jobs:
174170 # apk
175171 - name : Build an Android APK file
176172 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
178177 working-directory : code
179178
180179 # aab
181180 - name : Build an Android App Bundle file
182181 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
184186 working-directory : code
185187
186188 # apk/aab
@@ -189,13 +191,13 @@ jobs:
189191 uses : actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b # v2.2.1
190192 with :
191193 name : ${{ matrix.file }}-mapping.txt
192- path : code/build/app/outputs/mapping/release/ mapping.txt
194+ path : ${{ matrix.file }}- mapping.txt
193195 - name : Upload the release assets — ${{ matrix.file }}-mapping.txt file
194196 if : matrix.file == 'apk' || matrix.file == 'aab'
195197 uses : actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
196198 with :
197199 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
199201 asset_name : ${{ matrix.file }}-mapping.txt
200202 asset_content_type : text/plain
201203 env :
@@ -207,6 +209,7 @@ jobs:
207209 run : |
208210 flutter build ios --no-codesign --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH
209211 echo "::warning::TODO: fastlane export_ipa"
212+ echo "TODO: mv code/build/app/outputs/ipa/app.ipa app.ipa"
210213 working-directory : code
211214
212215 # all
@@ -232,6 +235,7 @@ jobs:
232235 with :
233236 name : app.${{ matrix.file }}
234237 path : ${{ matrix.build-file-path }}
238+ if-no-files-found : error
235239 - name : Upload the release assets — ${{ matrix.file }} file
236240 uses : actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2
237241 with :
0 commit comments