From ef933f209b2d55add826f8671ce642cdf8cef2bc Mon Sep 17 00:00:00 2001 From: SuperDragonXD <70206496+SuperDragonXD@users.noreply.github.com> Date: Wed, 3 Apr 2024 20:17:19 +0800 Subject: [PATCH] Fix Telegram send artifact function for release builds --- ci.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci.py b/ci.py index 36004a1801..8668b6775c 100644 --- a/ci.py +++ b/ci.py @@ -37,6 +37,11 @@ def send_document_to_telegram_chat(chat_id, document): def send_artifact_to_telegram_chat(chat_id): subdirectories = os.listdir(artifact_directory) + if "beta" in github_ref: + with open(f"{artifact_directory}/{os.listdir(artifact_directory)[0]}", "rb") as artifact: + send_document_to_telegram_chat(chat_id=chat_id, document=artifact) + return + for each_directory in subdirectories: full_path = f"{artifact_directory}/{each_directory}/debug" with open(f"{full_path}/{os.listdir(full_path)[0]}", "rb") as artifact: