diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59ac15c..a7f5b4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,6 +105,23 @@ jobs: - name: Find APK Files run: find app-release -name "*.apk" + + - name: Sign APK with Debug Keystore + run: | + keytool -genkey -v -keystore debug.keystore \ + -storepass android -alias androiddebugkey -keypass android \ + -dname "CN=Android Debug,O=Android,C=US" -keyalg RSA -validity 36500 + + jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \ + -keystore debug.keystore -storepass android -keypass android \ + app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk \ + androiddebugkey + + - name: Verify APK Signature + run: | + jarsigner -verify -verbose -certs \ + app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk + # Step 10: Upload APK as Artifact - name: Upload APK as Artifact uses: actions/upload-artifact@v4 @@ -133,21 +150,6 @@ jobs: # releaseFiles: app-release/app/build/outputs/apk/release/app-release.apk # Step 10: Generate and Sign APK with Temporary Debug Keystore - - name: Sign APK with Debug Keystore - run: | - keytool -genkey -v -keystore debug.keystore \ - -storepass android -alias androiddebugkey -keypass android \ - -dname "CN=Android Debug,O=Android,C=US" -keyalg RSA -validity 36500 - - jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \ - -keystore debug.keystore -storepass android -keypass android \ - app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk \ - androiddebugkey - -# Step 11: Verify APK Signature - - name: Verify APK Signature - run: | - jarsigner -verify -verbose -certs \ - app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk +