Files
tamigo-cli/.gitea/workflows/build.yml
Daniel Dybing 8e4ae990f9
All checks were successful
Build Tamigo CLI / Build Linux Binary (push) Successful in 52s
Build Tamigo CLI / Build Windows Binary (push) Successful in 4s
Workflow: Streamline Windows build using /tmp for PyInstaller to fix path errors
2026-03-11 15:15:02 +01:00

63 lines
2.0 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
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 (Streamlined)
run: |
# Create output directory
mkdir -p output_dist
# Run the build in one clean shot using volume mount for simplicity since we are on ubuntu-latest
# We override the entrypoint to run our own shell script inside Wine/Windows environment
docker run --rm \
-v "${{ github.workspace }}:/src" \
-w /src \
cdrx/pyinstaller-windows \
sh -c "pip install --upgrade pyinstaller && pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli --workpath /tmp/build --distpath /tmp/dist tamigo.py && cp /tmp/dist/tamigo-cli.exe /src/tamigo-cli.exe"
# Move the result to our tracked folder
mv tamigo-cli.exe output_dist/ || echo "EXE not found in root"
- name: Debug - List local results
run: |
ls -R output_dist/ || echo "output_dist not found"
- name: Upload Windows Artifact
uses: actions/upload-artifact@v3
with:
name: binary-windows
path: output_dist/*.exe