Explicitly sign APKs

This commit is contained in:
arkon 2023-08-15 22:16:36 -04:00
parent db37e1712e
commit c66eee5e3e

View File

@ -67,34 +67,40 @@ jobs:
| jq -r '.[]|"- \(.message | first) (@\(.username))"') | jq -r '.[]|"- \(.message | first) (@\(.username))"')
{delimiter}" >> $GITHUB_ENV {delimiter}" >> $GITHUB_ENV
mkdir -p ~/.android/ && echo "${{ secrets.DEBUG_KEYSTORE }}" | base64 --decode > ~/.android/debug.keystore
- name: Build APK - name: Build APK
uses: gradle/gradle-command-action@v2 uses: gradle/gradle-command-action@v2
with: with:
arguments: assembleStandardPreview 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 - name: Clean up build artifacts
run: | run: |
set -e 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 }'` sha=`sha256sum tachiyomi-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'`
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV 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 }'` sha=`sha256sum tachiyomi-arm64-v8a-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'`
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV 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 }'` sha=`sha256sum tachiyomi-armeabi-v7a-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'`
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV 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 }'` sha=`sha256sum tachiyomi-x86-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'`
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV 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 }'` sha=`sha256sum tachiyomi-x86_64-r${{ env.COMMIT_COUNT }}.apk | awk '{ print $1 }'`
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV