From 4b2209920a7b7a3f4a8dc26b70a37f2cb323c7eb Mon Sep 17 00:00:00 2001 From: Hsdi Date: Sun, 15 Mar 2026 01:34:38 +0800 Subject: [PATCH] feat: Add GitHub Actions workflow to build Windows executable using PyInstaller. --- .github/workflows/build-exe.yml | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build-exe.yml diff --git a/.github/workflows/build-exe.yml b/.github/workflows/build-exe.yml new file mode 100644 index 0000000..25ca445 --- /dev/null +++ b/.github/workflows/build-exe.yml @@ -0,0 +1,44 @@ +name: Build Windows EXE + +on: + workflow_dispatch: + push: + branches: + - main + release: + types: + - published + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyinstaller keyboard pywin32 + + - name: Build executable + 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