From f8dbc274e4ae7c3a2f1cfb86dea1b76f042efb88 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Mon, 16 Dec 2024 00:54:09 +0300 Subject: [PATCH] workflow --- .github/workflows/main.yml | 49 ++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ad979c..329a6a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,9 +63,11 @@ jobs: - name: Update about.kt run: | - sed -i 's/title = ".*"/title = "AlaskarTV app version"/' app-release/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt - sed -i 's/content = ".*"/content = "alaskartv-androidtv ${BuildConfig.VERSION_NAME} ${BuildConfig.BUILD_TYPE}"/' app-release/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt - sed -i 's/icon = .*/icon = R.drawable.app_icon_foreground_monochrome/' app-release/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt + sed -i '/link {/{ + n; s/setTitle(.*)/title = "AlaskarTV app version"/ + n; s/content = ".*"/content = "alaskartv-androidtv ${BuildConfig.VERSION_NAME} ${BuildConfig.BUILD_TYPE}"/ + n; s/icon = .*/icon = R.drawable.app_icon_foreground_monochrome/ + }' app-release/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt - name: Update UserPreferences.kt run: | @@ -116,25 +118,42 @@ jobs: run: | echo "$KEYSTORE_FILE" | base64 -d > keystore.jks - # Step 9: Sign the APK - - name: Sign APK + # # Step 9: Sign the APK + # - name: Sign APK + # env: + # KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + # KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} + # KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + # run: | + # jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \ + # -keystore keystore.jks \ + # -storepass "$KEYSTORE_PASSWORD" \ + # -keypass "$KEYSTORE_PASSWORD" \ + # app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk \ + # "$KEYSTORE_ALIAS" + # + # # Step 9: 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 + + - name: Sign APK with apksigner env: KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} KEY_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} run: | - jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \ - -keystore keystore.jks \ - -storepass "$KEYSTORE_PASSWORD" \ - -keypass "$KEYSTORE_PASSWORD" \ - app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk \ - "$KEYSTORE_ALIAS" + 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 - # Step 9: 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 + 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