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
# # Uploads artifact
# - name: Upload Artifact
# uses: actions/upload-artifact@v3
# with:
# name: ${{ runner.os }} Build
# path: |
# build/*.zip
# Uploads artifact
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }} Build
path: |
build/*.zip

View File

@ -5,4 +5,13 @@
# -------------------------------
import os
import zipfile
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)