Files
tamigo-cli/.gitea/workflows/build.yml
Daniel Dybing b156f203ba
Some checks failed
Build Tamigo CLI / Build Linux Binary (push) Successful in 51s
Build Tamigo CLI / Build Windows Binary (push) Failing after 4s
Workflow: Switch to modern Python 3.12 Docker image for Windows builds
2026-03-11 14:07:46 +01:00

68 lines
1.8 KiB
YAML

name: Build Tamigo CLI
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
workflow_dispatch:
jobs:
build-linux:
name: Build Linux Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build with PyInstaller
run: |
pyinstaller --onefile --name tamigo-cli tamigo.py
- name: Upload Linux Artifact
uses: actions/upload-artifact@v3
with:
name: binary-linux
path: dist/tamigo-cli
build-windows:
name: Build Windows Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Windows executable via Docker (Modern)
run: |
# Use a modern Python 3.12 image for Windows cross-compilation
docker create --name builder --entrypoint /bin/sh tobix/pyinstaller-windows:py312 -c "pip install --upgrade pip && pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
# Copy source code into the container
docker cp . builder:/src
# Start the container and wait
docker start -a builder
# Copy the results back
docker cp builder:/src/dist .
# Clean up
docker rm builder
- name: Debug - List output files
run: ls -R dist/
- name: Upload Windows Artifact
uses: actions/upload-artifact@v3
with:
name: binary-windows
path: dist/*.exe