Files
tamigo-cli/.gitea/workflows/build.yml
Daniel Dybing 4577d9f6b9
Some checks failed
Build Tamigo CLI / Build Linux Binary (push) Successful in 49s
Build Tamigo CLI / Build Windows Binary (push) Failing after 16s
Workflow: Use unique container names to avoid build conflicts
2026-03-11 14:22:21 +01:00

74 lines
1.9 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 (Unique Names)
run: |
# Ensure unique container name for this run
CONTAINER_NAME="builder-${{ github.run_id }}"
# Clean up any existing container with this name just in case
docker rm -f $CONTAINER_NAME || true
# Create container
docker create --name $CONTAINER_NAME cdrx/pyinstaller-windows
# Copy source code
docker cp . $CONTAINER_NAME:/src
# Run build
docker start -a $CONTAINER_NAME
# Copy results
docker cp $CONTAINER_NAME:/src/dist .
# Clean up
docker rm $CONTAINER_NAME
- 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