更新 .github/workflows/build-exe.yml
Some checks failed
Build Windows EXE / build (push) Failing after 10s
Some checks failed
Build Windows EXE / build (push) Failing after 10s
This commit is contained in:
30
.github/workflows/build-exe.yml
vendored
30
.github/workflows/build-exe.yml
vendored
@@ -2,31 +2,35 @@ name: Build Windows EXE
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
workflow_dispatch: # 允许手动触发
|
||||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Checkout code
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9.1' # 建议指定版本,确保稳定性
|
||||
cache: 'pip' # 自动缓存依赖,加快下次构建速度
|
||||
python-version: "3.9"
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install deps
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install pyinstaller keyboard pywin32
|
||||
pip install pyinstaller keyboard pywin32
|
||||
|
||||
- name: Build EXE
|
||||
run: |
|
||||
pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: exe
|
||||
path: dist/Shortcut_Sync_PotPlayer.exe
|
||||
|
||||
- name: Build with PyInstaller
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user