feat: Add GitHub Actions workflow to build Windows executable.
Some checks failed
Build Windows EXE / build (push) Failing after 2m41s
Some checks failed
Build Windows EXE / build (push) Failing after 2m41s
This commit is contained in:
38
.github/workflows/build-exe.yml
vendored
38
.github/workflows/build-exe.yml
vendored
@@ -5,40 +5,38 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Show workspace
|
||||
shell: powershell
|
||||
run: |
|
||||
Write-Host "Workspace: $pwd"
|
||||
Get-ChildItem
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Check Python
|
||||
shell: powershell
|
||||
run: |
|
||||
python --version
|
||||
pip --version
|
||||
|
||||
- name: Install dependencies
|
||||
shell: powershell
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pyinstaller keyboard pywin32
|
||||
|
||||
- name: Build executable
|
||||
shell: powershell
|
||||
run: |
|
||||
pyinstaller --noconfirm --onefile --windowed --name Shortcut_Sync_PotPlayer main.py
|
||||
|
||||
- name: Upload EXE artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Shortcut_Sync_PotPlayer-windows
|
||||
path: dist/Shortcut_Sync_PotPlayer.exe
|
||||
|
||||
- name: Upload release asset
|
||||
if: github.event_name == 'release'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: dist/Shortcut_Sync_PotPlayer.exe
|
||||
- name: Collect build output
|
||||
shell: powershell
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force output | Out-Null
|
||||
Copy-Item dist/Shortcut_Sync_PotPlayer.exe output/Shortcut_Sync_PotPlayer.exe -Force
|
||||
Get-ChildItem output
|
||||
|
||||
Reference in New Issue
Block a user