Skip to content

Commit d71ac68

Browse files
authored
Update build.yml
1 parent b946efd commit d71ac68

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on: [push, workflow_dispatch]
44
jobs:
55
build:
66
runs-on: ubuntu-latest
7-
87
steps:
98
- name: Checkout Code
109
uses: actions/checkout@v4
@@ -18,19 +17,21 @@ jobs:
1817
- name: Compile Release APK using Gradle
1918
run: gradle assembleRelease
2019

20+
- name: Decode Permanent Keystore
21+
run: |
22+
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > release.keystore
23+
2124
- name: Zipalign and Sign Release APK (V2 Signature)
2225
run: |
23-
keytool -genkey -v -keystore release.keystore -alias signAlias -keyalg RSA -keysize 2048 -validity 10000 -storepass mypassword -keypass mypassword -dname "CN=dhangofa, O=Github, C=US"
24-
2526
BUILD_TOOLS_DIR=$(ls -d $ANDROID_HOME/build-tools/* | tail -1)
2627
2728
$BUILD_TOOLS_DIR/zipalign -v -p 4 app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release-aligned.apk
2829
29-
$BUILD_TOOLS_DIR/apksigner sign --ks release.keystore --ks-pass pass:mypassword --out app/build/outputs/apk/release/BatteryRemapper.apk app/build/outputs/apk/release/app-release-aligned.apk
30+
$BUILD_TOOLS_DIR/apksigner sign --ks release.keystore --ks-pass pass:${{ secrets.KEYSTORE_PASSWORD }} --out app/build/outputs/apk/release/BatteryRemapper.apk app/build/outputs/apk/release/app-release-aligned.apk
3031
31-
- name: Upload APK Directly
32+
- name: Upload APK as Build Artifact
3233
uses: actions/upload-artifact@v4
3334
with:
34-
name: BatteryRemapper
35+
name: BatteryRemapper-Package
3536
path: app/build/outputs/apk/release/BatteryRemapper.apk
3637
compression-level: 0

0 commit comments

Comments
 (0)