commit d8a0dd911a278c959b8906a2cc4f149ef29ab402 Author: nomadics9 Date: Sun Dec 15 05:31:56 2024 +0300 init diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..c330528 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,116 @@ +name: Build and Customize Android App from Release + +on: + workflow_dispatch: # Allows manual triggering of the workflow + +jobs: + build-and-customize: + runs-on: ubuntu-latest + + steps: + # Step 1: Download the latest release tarball + - name: Download Latest Release + run: | + curl -s https://api.github.com/repos/upstream-org/upstream-repo/releases/latest \ + | jq -r '.tarball_url' \ + | xargs curl -L -o latest-release.tar.gz + + # Step 2: Extract the tarball + - name: Extract Release Tarball + run: | + mkdir -p app-release + tar -xzf latest-release.tar.gz --strip-components=1 -C app-release + + # Step 3: Parse version.txt + - name: Parse version.txt + id: parse_version + run: | + # Read values from version.txt + APPLICATION_ID=$(grep '^APPLICATION_ID=' version.txt | cut -d '=' -f 2) + VERSION_NAME=$(grep '^VERSION_NAME=' version.txt | cut -d '=' -f 2) + VERSION_CODE=$(grep '^VERSION_CODE=' version.txt | cut -d '=' -f 2) + + # Export values as environment variables + echo "APPLICATION_ID=$APPLICATION_ID" >> $GITHUB_ENV + echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV + echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV + + # Step 4: Replace assets in app/src/main/ + - name: Replace Assets + run: | + cp -r res/mipmap/* app-release/app/src/main/res/mipmap/ + cp -r res/drawable/* app-release/app/src/main/res/drawable/ + cp -r res/drawable-v24/* app-release/app/src/main/res/drawable-v24/ + + # 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 + + # Step 6: Update build.gradle.kts with version info + - name: Update build.gradle.kts + env: + APPLICATION_ID: ${{ env.APPLICATION_ID }} + 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 + + # 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 + + # Step 8: Set up Java and Gradle + - name: Set up Java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + + - name: Cache Gradle dependencies + uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + # Step 9: Build the APK + - name: Build APK + run: | + cd app-release + ./gradlew assembleRelease + + + # Step 10: Upload APK as Artifact + - name: Upload APK as Artifact + uses: actions/upload-artifact@v3 + with: + name: unsigned-apk + path: app-release/app/build/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release.apk + + # # Step 10: Sign the APK + # - name: Sign APK + # env: + # KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + # KEYSTORE_ALIAS: ${{ secrets.KEYSTORE_ALIAS }} + # KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} + # run: | + # jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 \ + # -keystore $KEYSTORE_FILE \ + # app-release/app/build/outputs/apk/release/app-release-unsigned.apk \ + # $KEYSTORE_ALIAS + + # # Step 11: (Optional) Upload to Play Store + # - name: Upload to Play Store + # uses: r0adkll/upload-google-play@v1 + # with: + # serviceAccountJson: ${{ secrets.PLAY_STORE_SERVICE_ACCOUNT }} + # packageName: ${{ env.APPLICATION_ID }} + # releaseFiles: app-release/app/build/outputs/apk/release/app-release.apk + diff --git a/res/drawable-v24/app_logo.xml b/res/drawable-v24/app_logo.xml new file mode 100644 index 0000000..1e9b6a5 --- /dev/null +++ b/res/drawable-v24/app_logo.xml @@ -0,0 +1,591 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/app_banner.xml b/res/drawable/app_banner.xml new file mode 100644 index 0000000..551900e --- /dev/null +++ b/res/drawable/app_banner.xml @@ -0,0 +1,4 @@ + + + + diff --git a/res/drawable/app_banner_adaptive.xml b/res/drawable/app_banner_adaptive.xml new file mode 100644 index 0000000..6f13bfe --- /dev/null +++ b/res/drawable/app_banner_adaptive.xml @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/app_banner_background.xml b/res/drawable/app_banner_background.xml new file mode 100644 index 0000000..f93879f --- /dev/null +++ b/res/drawable/app_banner_background.xml @@ -0,0 +1,9 @@ + + + diff --git a/res/drawable/app_banner_foreground.xml b/res/drawable/app_banner_foreground.xml new file mode 100644 index 0000000..6fa7b23 --- /dev/null +++ b/res/drawable/app_banner_foreground.xml @@ -0,0 +1,601 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/app_icon.xml b/res/drawable/app_icon.xml new file mode 100644 index 0000000..3676e14 --- /dev/null +++ b/res/drawable/app_icon.xml @@ -0,0 +1,4 @@ + + + + diff --git a/res/drawable/app_icon_background.xml b/res/drawable/app_icon_background.xml new file mode 100644 index 0000000..c4c5548 --- /dev/null +++ b/res/drawable/app_icon_background.xml @@ -0,0 +1,9 @@ + + + diff --git a/res/drawable/app_icon_foreground.xml b/res/drawable/app_icon_foreground.xml new file mode 100644 index 0000000..8260a10 --- /dev/null +++ b/res/drawable/app_icon_foreground.xml @@ -0,0 +1,443 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/app_icon_foreground_adaptive.xml b/res/drawable/app_icon_foreground_adaptive.xml new file mode 100644 index 0000000..a5b55b6 --- /dev/null +++ b/res/drawable/app_icon_foreground_adaptive.xml @@ -0,0 +1,439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/app_icon_foreground_monochrome.xml b/res/drawable/app_icon_foreground_monochrome.xml new file mode 100644 index 0000000..71dae2f --- /dev/null +++ b/res/drawable/app_icon_foreground_monochrome.xml @@ -0,0 +1,432 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/drawable/app_logo.xml b/res/drawable/app_logo.xml new file mode 100644 index 0000000..1e9b6a5 --- /dev/null +++ b/res/drawable/app_logo.xml @@ -0,0 +1,591 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/mipmap-anydpi-v26/app_banner.xml b/res/mipmap-anydpi-v26/app_banner.xml new file mode 100644 index 0000000..4c183e0 --- /dev/null +++ b/res/mipmap-anydpi-v26/app_banner.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/res/mipmap-anydpi-v26/app_icon.xml b/res/mipmap-anydpi-v26/app_icon.xml new file mode 100644 index 0000000..8376991 --- /dev/null +++ b/res/mipmap-anydpi-v26/app_icon.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/res/mipmap-anydpi-v26/app_icon_round.xml b/res/mipmap-anydpi-v26/app_icon_round.xml new file mode 100644 index 0000000..8376991 --- /dev/null +++ b/res/mipmap-anydpi-v26/app_icon_round.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/res/mipmap-hdpi/app_icon.webp b/res/mipmap-hdpi/app_icon.webp new file mode 100644 index 0000000..d587d10 Binary files /dev/null and b/res/mipmap-hdpi/app_icon.webp differ diff --git a/res/mipmap-hdpi/app_icon_round.webp b/res/mipmap-hdpi/app_icon_round.webp new file mode 100644 index 0000000..42b0a9b Binary files /dev/null and b/res/mipmap-hdpi/app_icon_round.webp differ diff --git a/res/mipmap-mdpi/app_icon.webp b/res/mipmap-mdpi/app_icon.webp new file mode 100644 index 0000000..9f15f28 Binary files /dev/null and b/res/mipmap-mdpi/app_icon.webp differ diff --git a/res/mipmap-mdpi/app_icon_round.webp b/res/mipmap-mdpi/app_icon_round.webp new file mode 100644 index 0000000..2e03100 Binary files /dev/null and b/res/mipmap-mdpi/app_icon_round.webp differ diff --git a/res/mipmap-xhdpi/app_icon.webp b/res/mipmap-xhdpi/app_icon.webp new file mode 100644 index 0000000..0ff1a2b Binary files /dev/null and b/res/mipmap-xhdpi/app_icon.webp differ diff --git a/res/mipmap-xhdpi/app_icon_round.webp b/res/mipmap-xhdpi/app_icon_round.webp new file mode 100644 index 0000000..1877f3d Binary files /dev/null and b/res/mipmap-xhdpi/app_icon_round.webp differ diff --git a/res/mipmap-xxhdpi/app_icon.webp b/res/mipmap-xxhdpi/app_icon.webp new file mode 100644 index 0000000..62facbd Binary files /dev/null and b/res/mipmap-xxhdpi/app_icon.webp differ diff --git a/res/mipmap-xxhdpi/app_icon_round.webp b/res/mipmap-xxhdpi/app_icon_round.webp new file mode 100644 index 0000000..a5fe196 Binary files /dev/null and b/res/mipmap-xxhdpi/app_icon_round.webp differ diff --git a/res/mipmap-xxxhdpi/app_icon.webp b/res/mipmap-xxxhdpi/app_icon.webp new file mode 100644 index 0000000..0657931 Binary files /dev/null and b/res/mipmap-xxxhdpi/app_icon.webp differ diff --git a/res/mipmap-xxxhdpi/app_icon_round.webp b/res/mipmap-xxxhdpi/app_icon_round.webp new file mode 100644 index 0000000..2ee58ad Binary files /dev/null and b/res/mipmap-xxxhdpi/app_icon_round.webp differ diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..288c48e --- /dev/null +++ b/version.txt @@ -0,0 +1,4 @@ +APPLICATION_ID=org.askartv.tv +VERSION_NAME=0.2.7 +VERSION_CODE=10 +