Difficult-Rocket/.github/workflows/after_compile.py

23 lines
613 B
Python
Raw Normal View History

2022-12-29 11:15:00 +08:00
# -------------------------------
# Difficult Rocket
# Copyright © 2021-2022 by shenjackyuanjie 3695888@qq.com
# All rights reserved
# -------------------------------
import os
import sys
2022-12-29 12:08:08 +08:00
import zipfile
if sys.platform == "win32":
os.system('')
print(os.listdir('./build'))
2022-12-29 12:08:08 +08:00
with zipfile.ZipFile('./build/main.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
2023-01-02 21:04:31 +08:00
for path, sub_paths, sub_files in os.walk('./build/Difficult-Rocket'):
2022-12-29 12:14:51 +08:00
print(f'writing {path}')
2022-12-29 12:08:08 +08:00
for file in sub_files:
file_path = os.path.join(path, file)
dist_zip.write(file_path)