40 lines
905 B
YAML
40 lines
905 B
YAML
name: Build Windows EXE
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: Ubuntu_docker_act
|
|
# 指定一个包含了 Node.js 的 Docker 镜像
|
|
container:
|
|
image: node:20-bullseye
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.9"
|
|
|
|
- name: Install dependencies
|
|
shell: powershell
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pyinstaller keyboard pywin32
|
|
|
|
- name: Build EXE
|
|
shell: powershell
|
|
run: |
|
|
pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Shortcut_Sync_PotPlayer
|
|
path: dist/Shortcut_Sync_PotPlayer.exe
|