From cef6f8df53a543954a46934aec898851c4cad8fc Mon Sep 17 00:00:00 2001 From: rozari0 Date: Sat, 22 Oct 2022 16:36:11 +0600 Subject: [PATCH] Sign debug APK. --- .github/tg.py | 2 +- .github/workflows/ci.yml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/tg.py b/.github/tg.py index 0c99f83ba..d6014548d 100644 --- a/.github/tg.py +++ b/.github/tg.py @@ -21,7 +21,7 @@ def bot(): Signed-off-by: {data['commit']['author']['name']} ''', parse_mode=telegram.ParseMode.MARKDOWN) - bot.send_media_group(TG_POST_ID, [telegram.InputMediaDocument(open('app-universal-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-x86-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-x86_64-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-armeabi-v7a-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-arm64-v8a-debug.apk', 'rb'))]) + bot.send_media_group(TG_POST_ID, [telegram.InputMediaDocument(open('app-universal-debug-signed.apk', 'rb')), telegram.InputMediaDocument(open('app-x86-debug-signed.apk', 'rb')), telegram.InputMediaDocument(open('app-x86_64-debug-signed.apk', 'rb')), telegram.InputMediaDocument(open('app-armeabi-v7a-debug-signed.apk', 'rb')), telegram.InputMediaDocument(open('app-arm64-v8a-debug-signed.apk', 'rb'))]) system('killall -9 python') if __name__ == '__main__': diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c86d6a6c6..ffbea94b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,17 @@ jobs: cd .. ./gradlew assembleDebug + - name: Sign Apk + id: sign_apk + uses: ilharp/sign-android-release@v1 + with: + releaseDir: app/build/outputs/apk/debug + signingKey: ${{ secrets.ANDROID_SIGNING_KEY }} + keyAlias: ${{ secrets.ANDROID_KEY_ALIAS }} + keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} + keyPassword: ${{ secrets.ANDROID_KEY_PASSWORD }} + + - name: Upload to Archive continue-on-error: true run: | @@ -61,7 +72,7 @@ jobs: echo "GH_REPO = '${{ github.repository }}'" > tgconfig.py git clone https://github.com/LibreTubeAlpha/Archive archive rm -rf archive/*.apk - mv app/build/outputs/apk/debug/*.apk archive/ + mv app/build/outputs/apk/debug/*-signed.apk archive/ cd archive python ../uploader.py @@ -86,4 +97,5 @@ jobs: uses: actions/upload-artifact@v3 with: name: app - path: archive/*.apk + path: archive/*-signed.apk +