Files
obdash/.gitea/workflows/release.yml
T
justin 18ab3ef97e
Build binaries / macos (push) Successful in 43s
Build binaries / windows (push) Failing after 55s
Build binaries / linux-amd64 (push) Successful in 1m25s
Build binaries / linux-arm64 (push) Successful in 1m50s
CI(windows): install Python to explicit TargetDir + log exit code
Per-user install landed somewhere my candidate-path check missed. Force the
install dir (LOCALAPPDATA\Python312) so python.exe is found deterministically.
(Linux/mac/arm64 builds succeeded; they only failed re-uploading to an existing
release -- softprops' asset-delete 404s on Gitea. A fresh release avoids that.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016yT89n4zR4qbrySoSiEyZs
2026-06-30 16:24:00 -04:00

108 lines
4.3 KiB
YAML

name: Build binaries
# Build OBDash GUI binaries on each self-hosted runner. On a version tag
# (v*), publish a Gitea Release with every platform's binary attached.
# Manual runs (workflow_dispatch) build-only (no release) to verify compilation.
on:
push:
tags: ["v*"]
workflow_dispatch: {}
jobs:
windows:
runs-on: windows-latest # self-hosted Windows runner (no Python preinstalled)
steps:
- uses: actions/checkout@v4
- name: Build OBDash.exe (PyInstaller)
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
Write-Host "Python not found; installing 3.12 to a fixed dir (no admin needed)..."
$url = "https://www.python.org/ftp/python/3.12.7/python-3.12.7-amd64.exe"
Invoke-WebRequest -Uri $url -OutFile "$env:TEMP\py.exe"
$dir = "$env:LOCALAPPDATA\Python312"
$p = Start-Process -Wait -PassThru -FilePath "$env:TEMP\py.exe" `
-ArgumentList "/quiet","TargetDir=$dir","PrependPath=1","Include_test=0"
Write-Host "installer exit code: $($p.ExitCode)"
if (-not (Test-Path "$dir\python.exe")) {
throw "python.exe not found at $dir after install (exit $($p.ExitCode))"
}
$env:Path = "$dir;$dir\Scripts;$env:Path"
}
python --version
python -m pip install --upgrade pip
pip install -r requirements-gui.txt pyinstaller
pyinstaller --noconfirm --onefile --windowed --name OBDash --add-data "profiles;profiles" run_gui.py
Copy-Item dist/OBDash.exe OBDash-windows.exe
- name: Publish to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: OBDash-windows.exe
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
macos:
runs-on: self-hosted-mac
steps:
- uses: actions/checkout@v4
- name: Build OBDash.app (PyInstaller)
shell: bash
run: |
python3 -m venv .build-venv
. .build-venv/bin/activate
pip install --upgrade pip
pip install -r requirements-gui.txt pyinstaller
pyinstaller --noconfirm --windowed --name OBDash --add-data "profiles:profiles" run_gui.py
ditto -c -k --keepParent dist/OBDash.app OBDash-macos.zip
- name: Publish to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: OBDash-macos.zip
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
linux-amd64:
runs-on: docker # Linux x86_64 runner
container: nikolaik/python-nodejs:python3.12-nodejs20 # has python+pip AND node (for checkout)
steps:
- uses: actions/checkout@v4
- name: Build OBDash (PyInstaller)
shell: bash
run: |
apt-get update && apt-get install -y patchelf libgl1 libegl1 libxkbcommon0
pip install --upgrade pip
pip install -r requirements-gui.txt pyinstaller
pyinstaller --noconfirm --onefile --name OBDash --add-data "profiles:profiles" run_gui.py
cp dist/OBDash OBDash-linux-x86_64
- name: Publish to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: OBDash-linux-x86_64
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}
linux-arm64:
runs-on: arm64 # Raspberry Pi (aarch64) runner
container: nikolaik/python-nodejs:python3.12-nodejs20 # multi-arch: pulls arm64
steps:
- uses: actions/checkout@v4
- name: Build OBDash (PyInstaller)
shell: bash
run: |
apt-get update && apt-get install -y patchelf libgl1 libegl1 libxkbcommon0
pip install --upgrade pip
pip install -r requirements-gui.txt pyinstaller
pyinstaller --noconfirm --onefile --name OBDash --add-data "profiles:profiles" run_gui.py
cp dist/OBDash OBDash-linux-aarch64
- name: Publish to release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: OBDash-linux-aarch64
env:
GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }}