mirror of
https://github.com/JoeanAmier/XHS-Downloader.git
synced 2026-03-22 06:57:16 +08:00
chore: 更新可执行文件构建流程
This commit is contained in:
54
.github/workflows/executable_build.yml
vendored
54
.github/workflows/executable_build.yml
vendored
@@ -9,37 +9,37 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest]
|
||||
python-version: [3.12]
|
||||
os: [ macos-latest, windows-latest,macos-latest-large ]
|
||||
python-version: [ 3.12 ]
|
||||
|
||||
steps:
|
||||
- name: 签出存储库
|
||||
uses: actions/checkout@v3
|
||||
- name: 签出存储库
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 设置 Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- 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: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
|
||||
- name: 构建 Win 可执行文件
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
|
||||
shell: pwsh
|
||||
- name: 构建 Win 可执行文件
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.ico --add-data "static:static" --add-data "locale:locale" main.py
|
||||
shell: pwsh
|
||||
|
||||
- name: 构建 Mac 可执行文件
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
pyinstaller --icon=./static/XHS-Downloader.icns --add-data "static:static" --add-data "locale:locale" main.py
|
||||
- name: 构建 Mac 可执行文件
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
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/main/
|
||||
- name: 上传文件
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: executable-${{ matrix.os }}
|
||||
path: dist/main/
|
||||
|
||||
Reference in New Issue
Block a user