Revert "ci: send debug and release build"
This reverts commit 2a9498e146
.
This commit is contained in:
parent
8fd846b099
commit
0e1c84f0ca
28
.github/scripts/upload.py
vendored
28
.github/scripts/upload.py
vendored
@ -79,22 +79,6 @@ def sendDocument(user_id, path, message = "", entities = None):
|
||||
'caption_entities': entities}
|
||||
response = requests.post(API_PREFIX + "sendDocument", files=files, data=data)
|
||||
print(response.json())
|
||||
return response.json()
|
||||
|
||||
|
||||
def sendMediaGroup(user_id, file_ids, message, entities = None):
|
||||
data = {
|
||||
"chat_id": user_id,
|
||||
"media": [],
|
||||
"type": "media"
|
||||
}
|
||||
for fileid in file_ids:
|
||||
data["media"].append({"type" : "document", "media" : fileid})
|
||||
data["media"][0]["caption"] = message
|
||||
data["media"][0]["caption_entities"] = entities
|
||||
result = requests.post(API_PREFIX + "sendMediaGroup", json=data).json()
|
||||
print(result)
|
||||
return result
|
||||
|
||||
|
||||
def sendRelease():
|
||||
@ -149,15 +133,11 @@ def sendRelease():
|
||||
def sendCIRelease():
|
||||
apks = os.listdir(APK_FOLDER)
|
||||
apks.sort()
|
||||
file_ids = list()
|
||||
for apk in apks:
|
||||
apk_path = os.path.join(APK_FOLDER, apk)
|
||||
result = sendDocument("@test_channel_nekox", path=apk_path)
|
||||
file_ids.append(result["result"]["document"]["file_id"])
|
||||
apk = os.path.join(APK_FOLDER, apks[0])
|
||||
entities = []
|
||||
message = f"CI Build\n\n{COMMIT_MESSAGE}\n\n"
|
||||
message += addEntity(entities, message, "text_link", COMMIT_HASH[0:8], f"https://github.com/NekoX-Dev/NekoX/commit/{COMMIT_HASH}")
|
||||
sendMediaGroup(CI_CHANNEL_ID, file_ids, message=message, entities=entities)
|
||||
sendDocument(user_id=CI_CHANNEL_ID, path = apk, message=message, )
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
@ -175,12 +155,10 @@ if __name__ == '__main__':
|
||||
CI_CHANNEL_ID = BOT_TARGET
|
||||
sendCIRelease()
|
||||
elif mode == "debug":
|
||||
CI_CHANNEL_ID = "@test_channel_nekox"
|
||||
APK_CHANNEL_ID = "@test_channel_nekox"
|
||||
UPDATE_CHANNEL_ID = "@test_channel_nekox"
|
||||
UPDATE_METADATA_CHANNEL_ID = "@test_channel_nekox"
|
||||
sendCIRelease()
|
||||
# sendRelease()
|
||||
sendRelease()
|
||||
else:
|
||||
print("unknown mode")
|
||||
|
||||
|
3
.github/workflows/debug.yml
vendored
3
.github/workflows/debug.yml
vendored
@ -440,9 +440,8 @@ jobs:
|
||||
export DEBUG_BUILD=true
|
||||
export NATIVE_TARGET=universal
|
||||
./gradlew TMessagesProj:assembleMiniRelease
|
||||
./gradlew TMessagesProj:assembleMiniDebug
|
||||
|
||||
APK=$(find TMessagesProj/build/outputs/apk/mini/ -name 'NekoX*.apk')
|
||||
APK=$(find TMessagesProj/build/outputs/apk/mini/release -name 'NekoX*.apk')
|
||||
echo "APK=$APK" >> $GITHUB_ENV
|
||||
VERSION_CODE=$(grep -E "def verCode = ([0-9]+)" TMessagesProj/build.gradle | sed "s/def verCode = //")
|
||||
VERSION_NAME=$(grep -E "def verName = " TMessagesProj/build.gradle | sed "s/def verName = //" | sed "s/\"//g")
|
||||
|
Loading…
Reference in New Issue
Block a user