From 0b6472b81037eece40e9393dcbc744c7972e7791 Mon Sep 17 00:00:00 2001 From: Agent Developer Date: Mon, 9 Mar 2026 23:47:13 +0000 Subject: [PATCH] ci: add Windows build workflow (PyInstaller + NSIS) - Triggers on version tags (v*) or workflow_dispatch - Builds BatchTube.exe via PyInstaller - Creates BatchTube-Setup-*.exe via NSIS - Uploads artifacts for download --- .github/workflows/build-windows.yml | 66 +++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/build-windows.yml diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..b1bd6e4 --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,66 @@ +name: BatchTube Windows Build + +on: + push: + tags: + - 'v*' + workflow_dispatch: + inputs: + version: + description: 'Version tag (e.g. v1.0.0)' + required: false + default: 'v1.0.0' + +jobs: + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + run: | + cd backend + pip install --upgrade pip + pip install -r requirements.txt + pip install pyinstaller + + - name: Download yt-dlp.exe + run: | + mkdir -p tools + curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe -o tools/yt-dlp.exe + + - name: Create empty database + run: | + cd backend + python -c "import sqlite3; sqlite3.connect('youtube_sipoc.db').close()" + + - name: Build Windows EXE + run: | + cd backend + pyinstaller batchtube-windows.spec --clean --noconfirm + + - name: Install NSIS + run: choco install nsis -y + + - name: Build NSIS Installer + run: makensis installer.nsi + + - name: Upload EXE artifact + uses: actions/upload-artifact@v4 + with: + name: BatchTube-Windows-EXE + path: backend/dist/BatchTube.exe + retention-days: 30 + + - name: Upload Installer artifact + uses: actions/upload-artifact@v4 + with: + name: BatchTube-Windows-Installer + path: BatchTube-Setup-*.exe + retention-days: 30