workflow
This commit is contained in:
parent
afb3e7a59f
commit
6533cb688c
1 changed files with 17 additions and 31 deletions
48
.github/workflows/main.yml
vendored
48
.github/workflows/main.yml
vendored
|
@ -45,12 +45,11 @@ jobs:
|
||||||
rm -r app-release/app/src/main/res/mipmap-*
|
rm -r app-release/app/src/main/res/mipmap-*
|
||||||
cp -r res/* app-release/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: Changes
|
||||||
- name: Update strings.xml
|
- name: Update strings.xml
|
||||||
run: |
|
run: |
|
||||||
sed -i 's/Jellyfin/AlaskarTV/g' app-release/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
|
|
||||||
- name: Update build.gradle.kts
|
- name: Update build.gradle.kts
|
||||||
env:
|
env:
|
||||||
APPLICATION_ID: ${{ env.APPLICATION_ID }}
|
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/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/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/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
|
- name: Update about.kt
|
||||||
run: |
|
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/enumPreference("app_theme", AppTheme.DARK)/enumPreference("app_theme", AppTheme.MUTED_PURPLE)/' \
|
||||||
|
app-release/app/src/main/java/org/jellyfin/androidtv/preference/UserPreferences.kt
|
||||||
sed -i "s/setProperty(\"archivesBaseName\", \".*\")/setProperty(\"archivesBaseName\", \"alaskartv-androidtv-v$VERSION_NAME\")/" app-release/app/build.gradle.kts
|
|
||||||
|
|
||||||
- name: Check files
|
- name: Check files
|
||||||
run: |
|
run: |
|
||||||
echo "Updated build.gradle.kts:"
|
echo "Updated Changes"
|
||||||
cat app-release/app/build.gradle.kts
|
cat app-release/app/build.gradle.kts
|
||||||
cat app-release/app/src/main/res/values/strings.xml
|
cat app-release/app/src/main/res/values/strings.xml
|
||||||
ls app-release/app/src/main/res/drawable
|
cat app-release/app/src/main/java/org/jellyfin/androidtv/preference/UserPreferences.kt
|
||||||
ls app-release/app/src/main/res/drawable-v24
|
cat app-release/app/src/main/java/org/jellyfin/androidtv/ui/preference/category/about.kt
|
||||||
ls app-release/app/src/main/res/mipmap-*
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Step 8: Set up Java and Gradle
|
# Step 6: Set up Java and Gradle
|
||||||
- name: Set up Java
|
- name: Set up Java
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
|
@ -98,7 +100,7 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gradle-21debug-
|
${{ runner.os }}-gradle-21debug-
|
||||||
|
|
||||||
# Step 9: Build the APK
|
# Step 7: Build the APK
|
||||||
- name: Build APK
|
- name: Build APK
|
||||||
run: |
|
run: |
|
||||||
cd app-release
|
cd app-release
|
||||||
|
@ -108,23 +110,7 @@ jobs:
|
||||||
run: find app-release -name "*.apk"
|
run: find app-release -name "*.apk"
|
||||||
|
|
||||||
|
|
||||||
# - name: Sign APK with Debug Keystore
|
# Step 8: Upload APK as Artifact
|
||||||
# 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
|
|
||||||
- name: Upload APK as Artifact
|
- name: Upload APK as Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue