Update BatteryHook.java #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build LSPosed Module | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Java Development Kit (JDK) | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Compile Release APK using Gradle | |
| run: gradle assembleRelease | |
| - name: Zipalign and Sign Release APK (V2 Signature) | |
| run: | | |
| 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" | |
| BUILD_TOOLS_DIR=$(ls -d $ANDROID_HOME/build-tools/* | tail -1) | |
| $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 | |
| $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 | |
| - name: Upload APK Directly | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: BatteryRemapper | |
| path: app/build/outputs/apk/release/BatteryRemapper.apk | |
| compression-level: 0 |