feat: try zip file

This commit is contained in:
shenjack 2022-12-29 12:08:08 +08:00
parent c341247228
commit 96ee0be7b6
2 changed files with 16 additions and 7 deletions

View File

@ -84,10 +84,10 @@ jobs:
run: python after_compile.py run: python after_compile.py
# # Uploads artifact # Uploads artifact
# - name: Upload Artifact - name: Upload Artifact
# uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
# with: with:
# name: ${{ runner.os }} Build name: ${{ runner.os }} Build
# path: | path: |
# build/*.zip build/*.zip

View File

@ -5,4 +5,13 @@
# ------------------------------- # -------------------------------
import os import os
import zipfile
print(os.listdir('./build')) print(os.listdir('./build'))
with zipfile.ZipFile('./build/main.zip', 'w', zipfile.ZIP_DEFLATED, compresslevel=9) as dist_zip:
for path, sub_paths, sub_files in os.walk('./build/DR.dist'):
for file in sub_files:
file_path = os.path.join(path, file)
dist_zip.write(file_path)