diff --git a/.github/uploader.py b/.github/uploader.py index d3d47c33a..fd6f1ec5b 100644 --- a/.github/uploader.py +++ b/.github/uploader.py @@ -1,9 +1,21 @@ -from os import system as run +from os import system as run, listdir, remove import tgconfig + +files, signed_files, unsigned_files = listdir(), [], [] +for file in files: + if file.endswith("signed.apk"): + signed_files.append(file) + elif file.endswith(".apk"): + unsigned_files.append(file) + +if len(signed_files): + for file in unsigned_files: + remove(file) + if tgconfig.GH_REPO.lower() == "libre-tube/libretube": run("git add -f *") run('git commit -m "WORKFLOW: ALPHA BUILDS"') run("git push -u") else: - print("Official Repo not Detected") \ No newline at end of file + print("Official Repo not Detected")