From 6533cb688cb7a57bf1728627845b9873ae495004 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Sun, 15 Dec 2024 18:16:29 +0300 Subject: [PATCH] workflow --- .github/workflows/main.yml | 48 ++++++++++++++------------------------ 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a4bb24f..882c6f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,12 +45,11 @@ jobs: rm -r app-release/app/src/main/res/mipmap-* cp -r res/* app-release/app/src/main/res - # Step 5: Replace strings in app/src/main/res/values/strings.xml + # Step 5: Changes - name: Update strings.xml run: | sed -i 's/Jellyfin/AlaskarTV/g' app-release/app/src/main/res/values/strings.xml - # Step 6: Update build.gradle.kts with version info - name: Update build.gradle.kts env: APPLICATION_ID: ${{ env.APPLICATION_ID }} @@ -60,30 +59,33 @@ jobs: sed -i "s/applicationId = \".*\"/applicationId = \"$APPLICATION_ID\"/" app-release/app/build.gradle.kts sed -i "s/versionName = \".*\"/versionName = \"$VERSION_NAME\"/" app-release/app/build.gradle.kts sed -i "s/versionCode = .*/versionCode = $VERSION_CODE/" app-release/app/build.gradle.kts + sed -i "s/setProperty(\"archivesBaseName\", \".*\")/setProperty(\"archivesBaseName\", \"alaskartv-androidtv-v$VERSION_NAME\")/" app-release/app/build.gradle.kts - # Step 7: Update about.kt - name: Update about.kt run: | - sed -i "s/applicationId = namespace/applicationId = \"$APPLICATION_ID\"/" app-release/app/build.gradle.kts + 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 "s/versionName = project.getVersionName()/versionName = \"$VERSION_NAME\"/" app-release/app/build.gradle.kts + - name: Update UserPreferences.kt + run: | + sed -i 's/booleanPreference("trick_play_enabled", false)/booleanPreference("trick_play_enabled", true)/' \ + app-release/app/src/main/java/org/jellyfin/androidtv/preference/UserPreferences.kt - sed -i "s/versionCode = getVersionCode(versionName!!)/versionCode = $VERSION_CODE/" app-release/app/build.gradle.kts - - sed -i "s/setProperty(\"archivesBaseName\", \".*\")/setProperty(\"archivesBaseName\", \"alaskartv-androidtv-v$VERSION_NAME\")/" app-release/app/build.gradle.kts + sed -i 's/enumPreference("app_theme", AppTheme.DARK)/enumPreference("app_theme", AppTheme.MUTED_PURPLE)/' \ + app-release/app/src/main/java/org/jellyfin/androidtv/preference/UserPreferences.kt - name: Check files run: | - echo "Updated build.gradle.kts:" + echo "Updated Changes" cat app-release/app/build.gradle.kts cat app-release/app/src/main/res/values/strings.xml - ls app-release/app/src/main/res/drawable - ls app-release/app/src/main/res/drawable-v24 - ls app-release/app/src/main/res/mipmap-* + cat app-release/app/src/main/java/org/jellyfin/androidtv/preference/UserPreferences.kt + cat app-release/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt - # Step 8: Set up Java and Gradle + # Step 6: Set up Java and Gradle - name: Set up Java uses: actions/setup-java@v4 with: @@ -98,7 +100,7 @@ jobs: restore-keys: | ${{ runner.os }}-gradle-21debug- - # Step 9: Build the APK + # Step 7: Build the APK - name: Build APK run: | cd app-release @@ -108,23 +110,7 @@ jobs: 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 }}-debug-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 }}-debug-unsigned.apk - - # Step 10: Upload APK as Artifact + # Step 8: Upload APK as Artifact - name: Upload APK as Artifact uses: actions/upload-artifact@v4 with: