From c66eee5e3e503d0dfb4b5131748be667baa3e0e9 Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 15 Aug 2023 22:16:36 -0400 Subject: [PATCH] Explicitly sign APKs --- .github/workflows/build_app.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_app.yml b/.github/workflows/build_app.yml index 2740713..43d9af8 100644 --- a/.github/workflows/build_app.yml +++ b/.github/workflows/build_app.yml @@ -67,34 +67,40 @@ jobs: | jq -r '.[]|"- \(.message | first) (@\(.username))"') {delimiter}" >> $GITHUB_ENV - mkdir -p ~/.android/ && echo "${{ secrets.DEBUG_KEYSTORE }}" | base64 --decode > ~/.android/debug.keystore - - name: Build APK uses: gradle/gradle-command-action@v2 with: arguments: assembleStandardPreview + - name: Sign APK + uses: r0adkll/sign-android-release@v1 + with: + releaseDirectory: app/build/outputs/apk/standard/preview + signingKeyBase64: ${{ secrets.DEBUG_KEYSTORE }} + alias: androiddebugkey + keyStorePassword: android + - name: Clean up build artifacts run: | set -e - cp app/build/outputs/apk/standard/preview/app-standard-universal-preview.apk tachiyomi-r${{ env.COMMIT_COUNT }}.apk + cp app/build/outputs/apk/standard/preview/app-standard-universal-preview-signed.apk tachiyomi-r${{ env.COMMIT_COUNT }}.apk sha=`sha256sum tachiyomi-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'` echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV - cp app/build/outputs/apk/standard/preview/app-standard-arm64-v8a-preview.apk tachiyomi-arm64-v8a-r${{ env.COMMIT_COUNT }}.apk + cp app/build/outputs/apk/standard/preview/app-standard-arm64-v8a-preview-signed.apk tachiyomi-arm64-v8a-r${{ env.COMMIT_COUNT }}.apk sha=`sha256sum tachiyomi-arm64-v8a-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'` echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV - cp app/build/outputs/apk/standard/preview/app-standard-armeabi-v7a-preview.apk tachiyomi-armeabi-v7a-r${{ env.COMMIT_COUNT }}.apk + cp app/build/outputs/apk/standard/preview/app-standard-armeabi-v7a-preview-signed.apk tachiyomi-armeabi-v7a-r${{ env.COMMIT_COUNT }}.apk sha=`sha256sum tachiyomi-armeabi-v7a-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'` echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV - cp app/build/outputs/apk/standard/preview/app-standard-x86-preview.apk tachiyomi-x86-r${{ env.COMMIT_COUNT }}.apk + cp app/build/outputs/apk/standard/preview/app-standard-x86-preview-signed.apk tachiyomi-x86-r${{ env.COMMIT_COUNT }}.apk sha=`sha256sum tachiyomi-x86-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'` echo "APK_X86_SHA=$sha" >> $GITHUB_ENV - cp app/build/outputs/apk/standard/preview/app-standard-x86_64-preview.apk tachiyomi-x86_64-r${{ env.COMMIT_COUNT }}.apk + cp app/build/outputs/apk/standard/preview/app-standard-x86_64-preview-signed.apk tachiyomi-x86_64-r${{ env.COMMIT_COUNT }}.apk sha=`sha256sum tachiyomi-x86_64-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'` echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV