From f722ac40a96605ef4926e28732e9a4159610f994 Mon Sep 17 00:00:00 2001 From: XelXen <78258352+XelXen@users.noreply.github.com> Date: Sat, 24 Sep 2022 16:33:32 +0530 Subject: [PATCH 1/2] Fix Archive Uploads --- .github/tg.py | 2 +- .github/uploader.py | 8 +------- .github/workflows/ci.yml | 7 +++++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/tg.py b/.github/tg.py index 5c6f7c409..0c99f83ba 100644 --- a/.github/tg.py +++ b/.github/tg.py @@ -6,7 +6,7 @@ from os import system from time import sleep as wait def deploy(): - system(f'./bot-api --local --api-id={TG_API_ID} --api-hash={TG_API_HASH}') + system(f'./exec --local --api-id={TG_API_ID} --api-hash={TG_API_HASH}') def bot(): wait(10) diff --git a/.github/uploader.py b/.github/uploader.py index a0cd08e12..d3d47c33a 100644 --- a/.github/uploader.py +++ b/.github/uploader.py @@ -2,14 +2,8 @@ from os import system as run import tgconfig if tgconfig.GH_REPO.lower() == "libre-tube/libretube": - run("git clone https://github.com/LibreTubeAlpha/Archive archive") - run("rm -rf archive/*.apk") - run("mv app/build/outputs/apk/debug/*.apk archive/") - run("cd archive") run("git add -f *") run('git commit -m "WORKFLOW: ALPHA BUILDS"') run("git push -u") - run("cd ..") else: - run("mkdir archive") - run("mv app/build/outputs/apk/debug/*.apk archive/") \ No newline at end of file + print("Official Repo not Detected") \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 789c5d348..c7ef42dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,10 @@ jobs: run: | mv .github/uploader.py . echo "GH_REPO = '${{ github.repository }}'" > tgconfig.py + git clone https://github.com/LibreTubeAlpha/Archive archive + rm -rf archive/*.apk + mv app/build/outputs/apk/debug/*.apk archive/ + cd archive python uploader.py - name: Telegram Bot @@ -66,8 +70,7 @@ jobs: run: | cd archive curl https://libre-tube.github.io/images/LibreAlpha.png --output alpha.png - curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/exec --output bot-api - chmod 755 ./bot-api + chmod 755 ./exec mv ../tgconfig.py . echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" >> tgconfig.py echo "TG_API_ID = '${{ secrets.TG_API_ID }}'" >> tgconfig.py From f9b39b75235dfa9bdfbad7b02076336d2fe7e08b Mon Sep 17 00:00:00 2001 From: XelXen <78258352+XelXen@users.noreply.github.com> Date: Wed, 28 Sep 2022 18:49:53 +0530 Subject: [PATCH 2/2] Switch to Alpha Banner Rename --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7ef42dec..b6bdbb91c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: continue-on-error: true run: | cd archive - curl https://libre-tube.github.io/images/LibreAlpha.png --output alpha.png + curl https://libre-tube.github.io/images/Alpha.png --output alpha.png chmod 755 ./exec mv ../tgconfig.py . echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" >> tgconfig.py