XHS_Downloader/.github/workflows/executable_build.yml
JoeanAmier 7cedd8d4b8 feat: 新增文件断点续传功能
1. 新增自动删除空文件夹功能
2. 引入 aiofiles 库
3. 修正 Actions 错误

Closes #142
Closes #143
2024-08-07 22:10:15 +08:00

43 lines
1.1 KiB
YAML

name: Build Executables
on:
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.12]
steps:
- name: 签出存储库
uses: actions/checkout@v3
- name: 设置 Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: 安装依赖项
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: 构建可执行文件
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static;static" --add-data "locale;locale" .\main.py
else
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
fi
- name: 上传文件
uses: actions/upload-artifact@v4
with:
name: executable-${{ matrix.os }}
path: dist/