From aad2766f5708a1615950dc80263b6a3f6c327099 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Mon, 16 Dec 2024 01:39:04 +0300 Subject: [PATCH] workflow --- .github/workflows/main.yml | 48 ++++++++++++++------------------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d40c230..9a8d59a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -111,13 +111,23 @@ jobs: - name: Find APK Files run: find app-release -name "*.apk" - # Step 8: Sign - - name: Decode Keystore - env: - KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} - run: | - echo "$KEYSTORE_FILE" | base64 -d > keystore.jks + - name: Sign app APK + - uses: r0adkll/sign-android-release@v1 + # ID used to access action output + id: sign_app + with: + releaseDirectory: app/build/outputs/apk/release + signingKeyBase64: ${{ secrets.KEYSTORE_FILE }} + alias: ${{ secrets.KEYSTORE_ALIAS }} + keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }} + # # Step 8: Sign + # - name: Decode Keystore + # env: + # KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} + # run: | + # echo "$KEYSTORE_FILE" | base64 -d > keystore.jks + # # # Step 9: Sign the APK # - name: Sign APK # env: @@ -138,35 +148,13 @@ jobs: # jarsigner -verify -verbose -certs \ # app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk - - name: Sign APK with apksigner - env: - KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} - run: | - apksigner sign --ks keystore.jks \ - --ks-key-alias "$KEYSTORE_ALIAS" \ - --ks-pass env:KEYSTORE_PASSWORD \ - --key-pass env:KEY_PASSWORD \ - --out app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release.apk \ - app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk - - - name: Verify APK Signature - run: | - apksigner verify --verbose app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release.apk - - # Step 10: Rename Signed APK - - name: Rename Signed APK - run: | - mv app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk \ - app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-signed.apk - # Step 11: Upload Signed APK as Artifact - name: Upload Signed APK uses: actions/upload-artifact@v4 with: name: signed-apk - path: app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-signed.apk + path: ${{steps.sign_app.outputs.signedReleaseFile}} + # path: app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-signed.apk