Merge pull request #514 from LibreTubeAlpha/production

Alpha Icon Patch
This commit is contained in:
Bnyro 2022-06-15 18:31:48 +02:00 committed by GitHub
commit 235b5d0d96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 7 deletions

10
.github/patch.py vendored Normal file
View File

@ -0,0 +1,10 @@
from os import system
patchRes = ["mdpi", "hdpi", "xhdpi", "xxhdpi", "xxxhdpi"]
for res in patchRes:
system(f"rm -rf ../app/src/main/res/mipmap-{res}/ic_launcher.png")
system(f"rm -rf ../app/src/main/res/mipmap-{res}/ic_launcher_foreground.png")
system(f"rm -rf ../app/src/main/res/mipmap-{res}/ic_launcher_round.png")
system(f"curl https://libre-tube.github.io/alpha-patch/mipmap-{res}/ic_launcher.png --output ../app/src/main/res/mipmap-{res}/ic_launcher.png")
system(f"curl https://libre-tube.github.io/alpha-patch/mipmap-{res}/ic_launcher_foreground.png --output ../app/src/main/res/mipmap-{res}/ic_launcher_foreground.png")
system(f"curl https://libre-tube.github.io/alpha-patch/mipmap-{res}/ic_launcher_round.png --output ../app/src/main/res/mipmap-{res}/ic_launcher_round.png")

3
.github/tg.py vendored
View File

@ -1,7 +1,6 @@
import telegram
from tgconfig import TG_TOKEN
from json import load
from time import sleep
f = open('commit.json')
data = load(f)
@ -19,4 +18,4 @@ Signed-off-by: {data['commit']['author']['name']}
bot.send_document(TG_CHAT_ID, open('app-arm64-v8a-debug.apk', 'rb'))
bot.send_document(TG_CHAT_ID, open('app-armeabi-v7a-debug.apk', 'rb'))
bot.send_document(TG_CHAT_ID, open('app-x86_64-debug.apk', 'rb'))
bot.send_document(TG_CHAT_ID, open('app-x86-debug.apk', 'rb'))
bot.send_document(TG_CHAT_ID, open('app-x86-debug.apk', 'rb'))

View File

@ -29,8 +29,12 @@ jobs:
distribution: "temurin"
cache: "gradle"
- name: Build debug APK and run jvm tests
run: ./gradlew assembleDebug
- name: Patch and Compile
run: |
cd .github
python patch.py
cd ..
./gradlew assembleDebug
- name: Upload APK
uses: actions/upload-artifact@v3

View File

@ -27,12 +27,16 @@ jobs:
distribution: "temurin"
cache: "gradle"
- name: Build debug APK and run jvm tests
run: ./gradlew assembleDebug
- name: Patch and Compile
run: |
cd .github
python patch.py
cd ..
./gradlew assembleDebug
- name: Telegram Bot
run: |
mv app/build/outputs/apk/debug/*.apk .github/
mv ./app/build/outputs/apk/debug/*.apk .github/
cd .github
curl https://libre-tube.github.io/assets/LibreAlpha.png --output alpha.png
echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" > tgconfig.py