workflow
This commit is contained in:
parent
5ded8e4f58
commit
d36f4a5d46
1 changed files with 8 additions and 4 deletions
12
.github/workflows/main.yml
vendored
12
.github/workflows/main.yml
vendored
|
@ -24,8 +24,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir -p app-release
|
mkdir -p app-release
|
||||||
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)
|
|
||||||
mv "app-release/$extracted_dir" app-release/source
|
|
||||||
|
|
||||||
# Step 3: Parse version.txt
|
# Step 3: Parse version.txt
|
||||||
- name: Parse version.txt
|
- name: Parse version.txt
|
||||||
|
@ -44,7 +42,7 @@ 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: |
|
||||||
find app-release/app/src/main/res/mipmap-* -type f -name "app_icon.*" -delete
|
rm 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: Replace strings in app/src/main/res/values/strings.xml
|
||||||
|
@ -74,8 +72,14 @@ jobs:
|
||||||
|
|
||||||
sed -i "s/setProperty(\"archivesBaseName\", \".*\")/setProperty(\"archivesBaseName\", \"alaskartv-androidtv-v$VERSION_NAME\")/" app-release/app/build.gradle.kts
|
sed -i "s/setProperty(\"archivesBaseName\", \".*\")/setProperty(\"archivesBaseName\", \"alaskartv-androidtv-v$VERSION_NAME\")/" app-release/app/build.gradle.kts
|
||||||
|
|
||||||
|
- name: Check files
|
||||||
|
run: |
|
||||||
echo "Updated build.gradle.kts:"
|
echo "Updated build.gradle.kts:"
|
||||||
cat app-release/app/build.gradle.kts
|
cat app-release/app/build.gradle.kts
|
||||||
|
cat app-release/app/src/main/res/values/strings.xml
|
||||||
|
ls app-release/app/src/main/res/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Step 8: Set up Java and Gradle
|
# Step 8: Set up Java and Gradle
|
||||||
- name: Set up Java
|
- name: Set up Java
|
||||||
|
@ -103,7 +107,7 @@ jobs:
|
||||||
|
|
||||||
# Step 10: Upload APK as Artifact
|
# Step 10: Upload APK as Artifact
|
||||||
- name: Upload APK as Artifact
|
- name: Upload APK as Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: unsigned-apk
|
name: unsigned-apk
|
||||||
path: app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk
|
path: app-release/app/build/outputs/apk/release/alaskartv-androidtv-v${{ env.VERSION_NAME }}-release-unsigned.apk
|
||||||
|
|
Loading…
Reference in a new issue