更新 .github/workflows/build-exe.yml
This commit is contained in:
30
.github/workflows/build-exe.yml
vendored
30
.github/workflows/build-exe.yml
vendored
@@ -1,5 +1,4 @@
|
|||||||
name: Build Windows EXE
|
name: Build Windows EXE
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
@@ -7,42 +6,29 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: Ubuntu_docker_act # 使用上面的标签
|
runs-on: Ubuntu_docker_act # 现在这个标签指向 runner-images
|
||||||
|
|
||||||
container:
|
|
||||||
image: ubuntu-latest
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
# Node.js 已经预装,直接使用
|
# 直接使用,不需要 container 指定
|
||||||
- name: Node.js version
|
|
||||||
run: node --version
|
|
||||||
|
|
||||||
# Python 已经预装,直接使用
|
|
||||||
- name: Python version
|
|
||||||
run: python --version
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.13.9"
|
python-version: "3.13.9"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
shell: powershell
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install pyinstaller keyboard pywin32
|
pip install pyinstaller keyboard pywin32
|
||||||
|
|
||||||
- name: Build EXE
|
- name: Build EXE
|
||||||
shell: powershell
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py
|
pyinstaller --onefile --windowed --name Shortcut_Sync_PotPlayer main.py
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Shortcut_Sync_PotPlayer
|
name: Shortcut_Sync_PotPlayer
|
||||||
path: dist/Shortcut_Sync_PotPlayer.exe
|
path: dist/Shortcut_Sync_PotPlayer.exe
|
||||||
Reference in New Issue
Block a user