Skip to content

Commit

Permalink
Update android-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lindongchen authored Jul 26, 2024
1 parent 5c6ed2e commit 58e91bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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:
Expand Down

0 comments on commit 58e91bd

Please sign in to comment.