42 lines
1.6 KiB
YAML
42 lines
1.6 KiB
YAML
name: Build Windows
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build EXE + Installer (Wine)
|
|
run: |
|
|
docker pull cdrx/pyinstaller-windows:python3
|
|
docker run --rm -v "$(pwd):/src" -e SRCDIR=/src cdrx/pyinstaller-windows:python3 \
|
|
"pyinstaller --clean -y --noconfirm --onefile --windowed --name PulseGate --icon assets/pulsegate.ico --distpath dist/windows --workpath /tmp desktop/pulsegate_desktop.py; \
|
|
cp dist/windows/PulseGate.exe dist/PulseGate.exe; \
|
|
apt-get update -qq >/dev/null 2>&1 && apt-get install -y -qq xvfb >/dev/null 2>&1; \
|
|
curl -sL -o /tmp/is.exe https://github.com/jrsoftware/issrc/releases/download/is-7_1_0/innosetup-7.1.0-x64.exe; \
|
|
xvfb-run -a wine /tmp/is.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART; \
|
|
cd /src/installer && xvfb-run -a wine '/wine/drive_c/Program Files/Inno Setup 7/ISCC.exe' 'Z:\src\installer\installer.iss'; \
|
|
chown -R $(id -u):$(id -g) /src/dist /src/installer/output"
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: PulseGate-Windows
|
|
path: |
|
|
dist/PulseGate.exe
|
|
installer/output/*.exe
|
|
|
|
- name: Release
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: gitea/actions/release-action@v1
|
|
with:
|
|
files: |
|
|
dist/PulseGate.exe
|
|
installer/output/*.exe |