diff options
Diffstat (limited to '.ci/scripts/android/upload.sh')
| -rwxr-xr-x | .ci/scripts/android/upload.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.ci/scripts/android/upload.sh b/.ci/scripts/android/upload.sh new file mode 100755 index 000000000..cfaeff328 --- /dev/null +++ b/.ci/scripts/android/upload.sh | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #!/bin/bash -ex | ||
| 2 | |||
| 3 | # SPDX-FileCopyrightText: 2023 yuzu Emulator Project | ||
| 4 | # SPDX-License-Identifier: GPL-3.0-or-later | ||
| 5 | |||
| 6 | . ./.ci/scripts/common/pre-upload.sh | ||
| 7 | |||
| 8 | REV_NAME="yuzu-${GITDATE}-${GITREV}" | ||
| 9 | |||
| 10 | BUILD_FLAVOR=mainline | ||
| 11 | |||
| 12 | cp src/android/app/build/outputs/apk/"${BUILD_FLAVOR}/release/app-${BUILD_FLAVOR}-release.apk" \ | ||
| 13 | "artifacts/${REV_NAME}.apk" | ||
| 14 | cp src/android/app/build/outputs/bundle/"${BUILD_FLAVOR}Release"/"app-${BUILD_FLAVOR}-release.aab" \ | ||
| 15 | "artifacts/${REV_NAME}.aab" | ||
| 16 | |||
| 17 | if [ -n "${ANDROID_KEYSTORE_B64}" ] | ||
| 18 | then | ||
| 19 | echo "Signing apk..." | ||
| 20 | base64 --decode <<< "${ANDROID_KEYSTORE_B64}" > ks.jks | ||
| 21 | |||
| 22 | apksigner sign --ks ks.jks \ | ||
| 23 | --ks-key-alias "${ANDROID_KEY_ALIAS}" \ | ||
| 24 | --ks-pass env:ANDROID_KEYSTORE_PASS "artifacts/${REV_NAME}.apk" | ||
| 25 | else | ||
| 26 | echo "No keystore specified, not signing the APK files." | ||
| 27 | fi | ||