From 58e91bd4eb840a453cdd7929055ab5611bc4455a Mon Sep 17 00:00:00 2001 From: DongChen Lin <393227948@qq.com> Date: Fri, 26 Jul 2024 14:15:04 +0800 Subject: [PATCH] Update android-build.yml --- .github/workflows/android-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index cc162643..794da54e 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -61,12 +61,16 @@ jobs: NODE_OPTIONS="--max-old-space-size=4096" yarn android-build - name: Align apk run: | + export JAVA_HOME='/opt/hostedtoolcache/Java_Adopt_jdk/17.0.10-7/x64' + export ANDROID_HOME='/usr/local/lib/android/sdk' $ANDROID_HOME/build-tools/30.0.3/zipalign -v 4 ./gui/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned.apk ./gui/src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release-unsigned-aligned.apk - name: Decode keystore run: | echo ${{ secrets.KEYSTORE_BASE64 }} | base64 --decode > ./my-release-key.jks - name: Sign apk run: | + export JAVA_HOME='/opt/hostedtoolcache/Java_Adopt_jdk/17.0.10-7/x64' + export ANDROID_HOME='/usr/local/lib/android/sdk' $ANDROID_HOME/build-tools/30.0.3/apksigner sign --ks ./my-release-key.jks \ --ks-pass env:KEYSTORE_PASSWORD \ --key-pass env:KEY_PASSWORD \ @@ -78,6 +82,8 @@ jobs: KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} - name: Verify APK run: | + export JAVA_HOME='/opt/hostedtoolcache/Java_Adopt_jdk/17.0.10-7/x64' + export ANDROID_HOME='/usr/local/lib/android/sdk' $ANDROID_HOME/build-tools/30.0.3/apksigner verify ./gui/src-tauri/gen/android/app/build/outputs/apk/universal/release/ztm.apk - uses: actions/upload-artifact@v2 with: