chore: 优化可执行文件构建流程

This commit is contained in:
JoeanAmier
2024-08-08 18:54:34 +08:00
parent 169128de8d
commit ce01a7b2d7
4 changed files with 7 additions and 5 deletions

View File

@@ -27,19 +27,19 @@ jobs:
pip install -r requirements.txt
pip install pyinstaller
- name: 构建可执行文件
- name: 构建 Win 可执行文件
if: runner.os == 'Windows'
run: |
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static;static" --add-data "locale;locale" .\main.py
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
shell: pwsh
- name: Build executable on macOS
- name: 构建 Mac 可执行文件
if: runner.os == 'macOS'
run: |
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
pyinstaller --icon=./static/XHS-Downloader.icns --add-data "static:static" --add-data "locale:locale" main.py
- name: 上传文件
uses: actions/upload-artifact@v4
with:
name: executable-${{ matrix.os }}
path: dist/
path: dist/main/