This commit is contained in:
nomadics9 2024-12-15 05:57:45 +03:00
parent 870ba1a270
commit a9db403d13

View file

@ -22,7 +22,6 @@ jobs:
tar -xzf latest-release.tar.gz --strip-components=1 -C app-release tar -xzf latest-release.tar.gz --strip-components=1 -C app-release
extracted_dir=$(ls app-release | head -n 1) extracted_dir=$(ls app-release | head -n 1)
mv "app-release/$extracted_dir" app-release/source mv "app-release/$extracted_dir" app-release/source
ls -R app-release
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -44,12 +43,12 @@ jobs:
# Step 4: Replace assets in app/src/main/ # Step 4: Replace assets in app/src/main/
- name: Replace Assets - name: Replace Assets
run: | run: |
cp -r res/* app-release/source/app/src/main/res cp -r res/* app-release/app/src/main/res
# Step 5: Replace strings in app/src/main/res/values/strings.xml # Step 5: Replace strings in app/src/main/res/values/strings.xml
- name: Update strings.xml - name: Update strings.xml
run: | run: |
sed -i 's/Jellyfin/AlaskarTV/g' app-release/source/app/src/main/res/values/strings.xml sed -i 's/Jellyfin/AlaskarTV/g' app-release/app/src/main/res/values/strings.xml
# Step 6: Update build.gradle.kts with version info # Step 6: Update build.gradle.kts with version info
- name: Update build.gradle.kts - name: Update build.gradle.kts
@ -58,16 +57,16 @@ jobs:
VERSION_NAME: ${{ env.VERSION_NAME }} VERSION_NAME: ${{ env.VERSION_NAME }}
VERSION_CODE: ${{ env.VERSION_CODE }} VERSION_CODE: ${{ env.VERSION_CODE }}
run: | run: |
sed -i "s/applicationId = \".*\"/applicationId = \"$APPLICATION_ID\"/" app-release/source/app/build.gradle.kts sed -i "s/applicationId = \".*\"/applicationId = \"$APPLICATION_ID\"/" app-release/app/build.gradle.kts
sed -i "s/versionName = \".*\"/versionName = \"$VERSION_NAME\"/" app-release/source/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/source/app/build.gradle.kts sed -i "s/versionCode = .*/versionCode = $VERSION_CODE/" app-release/app/build.gradle.kts
# Step 7: Update about.kt # Step 7: Update about.kt
- name: Update about.kt - name: Update about.kt
run: | run: |
sed -i 's/title = ".*"/title = "AlaskarTV app version"/' app-release/source/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt 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/source/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/source/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
# Step 8: Set up Java and Gradle # Step 8: Set up Java and Gradle
- name: Set up Java - name: Set up Java