This commit is contained in:
nomadics9 2024-12-15 05:44:59 +03:00
parent cfd6762f80
commit 0f810f0792

View file

@ -20,6 +20,7 @@ jobs:
run: |
mkdir -p app-release
tar -xzf latest-release.tar.gz --strip-components=1 -C app-release
mv app-release/* app-release/source
- name: Checkout Repository
uses: actions/checkout@v4
@ -41,12 +42,12 @@ jobs:
# Step 4: Replace assets in app/src/main/
- name: Replace Assets
run: |
cp -r res/* app-release/app/src/main/res
cp -r res/* app-release/source/app/src/main/res
# Step 5: Replace strings in app/src/main/res/values/strings.xml
- name: Update strings.xml
run: |
sed -i 's/Jellyfin/AlaskarTV/g' app-release/app/src/main/res/values/strings.xml
sed -i 's/Jellyfin/AlaskarTV/g' app-release/source/app/src/main/res/values/strings.xml
# Step 6: Update build.gradle.kts with version info
- name: Update build.gradle.kts
@ -55,16 +56,16 @@ jobs:
VERSION_NAME: ${{ env.VERSION_NAME }}
VERSION_CODE: ${{ env.VERSION_CODE }}
run: |
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/applicationId = \".*\"/applicationId = \"$APPLICATION_ID\"/" app-release/source/app/build.gradle.kts
sed -i "s/versionName = \".*\"/versionName = \"$VERSION_NAME\"/" app-release/source/app/build.gradle.kts
sed -i "s/versionCode = .*/versionCode = $VERSION_CODE/" app-release/source/app/build.gradle.kts
# Step 7: Update about.kt
- 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 's/title = ".*"/title = "AlaskarTV app version"/' 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/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/source/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt
# Step 8: Set up Java and Gradle
- name: Set up Java
@ -93,7 +94,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: unsigned-apk
path: app-release/app/build/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release.apk
path: app-release/source/app/build/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release.apk
# # Step 10: Sign the APK
# - name: Sign APK