Files
batchtube/.github/workflows/build-windows.yml
Agent Developer 0b6472b810 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
2026-03-09 23:47:13 +00:00

67 lines
1.6 KiB
YAML

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