diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c377046..056d870 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,19 +24,23 @@ jobs: - name: Execute Gradle build run: ./gradlew --no-daemon --build-cache assembleRelease + - name: Get build tools + run: | + BUILD_TOOLS_PATH=/usr/local/lib/android/sdk/build-tools/$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) + echo "BUILD_TOOLS=$BUILD_TOOLS_PATH" >> $GITHUB_ENV + + - name: Zipalign the APK + run: | + $BUILD_TOOLS/zipalign -v 4 app/build/outputs/apk/release/app-release-unsigned.apk app-release-unsigned.apk + - name: Sign the APK run: | echo "${{ secrets.KEYSTORE }}" > keystore.asc gpg -d --passphrase "${{ secrets.KEY_PASSWD }}" --batch keystore.asc > keystore.jks - jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore keystore.jks -storepass ${{ secrets.KEY_PASSWD }} -keypass ${{ secrets.KEY_PASSWD }} app/build/outputs/apk/release/app-release-unsigned.apk ${{ secrets.KEY_ALIAS }} + $BUILD_TOOLS/apksigner sign --ks keystore.jks --ks-key-alias ${{ secrets.KEY_ALIAS }} --ks-pass pass:${{ secrets.KEY_PASSWD }} --key-pass pass:${{ secrets.KEY_PASSWD }} --out app-release.apk app-release-unsigned.apk - name: Verify the APK signature - run: jarsigner -verify -verbose -certs -keystore keystore.jks -storepass ${{ secrets.KEY_PASSWD }} app/build/outputs/apk/release/app-release-unsigned.apk ${{ secrets.KEY_ALIAS }} - - - name: Zipalign the APK - run: | - BUILD_TOOLS_PATH=/usr/local/lib/android/sdk/build-tools/$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) - $BUILD_TOOLS_PATH/zipalign -v 4 app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release.apk + run: apksigner verify app-release.apk - name: Create Release id: create_release diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ad3b67f..86e9863 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] app-versionID = "org.yrovas.linklater" -app-versionCode = "2" -app-versionName = "0.1.1" +app-versionCode = "1" +app-versionName = "0.1.0" app-compileSDK = "34" app-targetSDK = "34" app-minimumSDK = "23"