|
4 | 4 | release: |
5 | 5 | types: [ published ] |
6 | 6 |
|
| 7 | +env: |
| 8 | + FLUTTER_DEBUG_INFO_PATH: $FLUTTER_DEBUG_INFO_PATH |
| 9 | + |
7 | 10 | jobs: |
8 | 11 | security_hardening: |
9 | 12 | name: Check security hardening |
@@ -171,25 +174,59 @@ jobs: |
171 | 174 | # apk |
172 | 175 | - name: Build an Android APK file |
173 | 176 | if: matrix.file == 'apk' |
174 | | - run: flutter build apk --obfuscate --split-debug-info=build/app/outputs/symbols |
| 177 | + run: flutter build apk --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH |
175 | 178 | working-directory: code |
176 | 179 |
|
177 | 180 | # aab |
178 | 181 | - name: Build an Android App Bundle file |
179 | 182 | if: matrix.file == 'aab' |
180 | | - run: flutter build appbundle --obfuscate --split-debug-info=build/app/outputs/symbols |
| 183 | + run: flutter build appbundle --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH |
181 | 184 | working-directory: code |
182 | 185 |
|
| 186 | + # apk/aab |
| 187 | + - name: Upload the artifacts — ${{ matrix.file }}-mapping.txt file |
| 188 | + if: matrix.file == 'apk' || matrix.file == 'aab' |
| 189 | + uses: actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b # v2.2.1 |
| 190 | + with: |
| 191 | + name: ${{ matrix.file }}-mapping.txt |
| 192 | + path: build/app/outputs/mapping/release/mapping.txt |
| 193 | + - name: Upload the release assets — ${{ matrix.file }}-mapping.txt file |
| 194 | + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 |
| 195 | + with: |
| 196 | + upload_url: ${{ github.event.release.upload_url }} |
| 197 | + asset_path: build/app/outputs/mapping/release/mapping.txt |
| 198 | + asset_name: ${{ matrix.file }}-mapping.txt |
| 199 | + asset_content_type: text/plain |
| 200 | + env: |
| 201 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 202 | + |
183 | 203 | # ipa |
184 | 204 | - name: Build an iOS App Store Package file |
185 | 205 | if: matrix.file == 'ipa' |
186 | 206 | run: | |
187 | | - flutter build ios --no-codesign --obfuscate --split-debug-info=build/app/outputs/symbols |
| 207 | + flutter build ios --no-codesign --obfuscate --split-debug-info=$FLUTTER_DEBUG_INFO_PATH |
188 | 208 | echo "::warning::TODO: fastlane export_ipa" |
189 | 209 | working-directory: code |
190 | 210 |
|
191 | 211 | # all |
192 | | - - name: Backup the artifacts — ${{ matrix.file }} file |
| 212 | + - name: Archive Flutter symbols |
| 213 | + run: zip --recurse-paths flutter-${{ matrix.file }}-symbols.zip $FLUTTER_DEBUG_INFO_PATH |
| 214 | + working-directory: code |
| 215 | + - name: Upload the artifacts — flutter-${{ matrix.file }}-symbols.zip file |
| 216 | + uses: actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b # v2.2.1 |
| 217 | + with: |
| 218 | + name: flutter-${{ matrix.file }}-symbols.zip |
| 219 | + path: code/flutter-${{ matrix.file }}-symbols.zip |
| 220 | + - name: Upload the release assets — flutter-${{ matrix.file }}-symbols.zip file |
| 221 | + uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 |
| 222 | + with: |
| 223 | + upload_url: ${{ github.event.release.upload_url }} |
| 224 | + asset_path: code/flutter-${{ matrix.file }}-symbols.zip |
| 225 | + asset_name: flutter-${{ matrix.file }}-symbols.zip |
| 226 | + asset_content_type: application/zip |
| 227 | + env: |
| 228 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 229 | + - name: Upload the artifacts — ${{ matrix.file }} file |
193 | 230 | uses: actions/upload-artifact@726a6dcd0199f578459862705eed35cda05af50b # v2.2.1 |
194 | 231 | with: |
195 | 232 | name: app.${{ matrix.file }} |
|
0 commit comments