68 lines
1.9 KiB
YAML
68 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
|
|
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 (Standard CDRX)
|
|
run: |
|
|
# The cdrx image is actually quite good if we let it use its OWN entrypoint
|
|
# The issue was my custom 'sh -c' was breaking its Wine environment setup
|
|
mkdir -p output_dist
|
|
|
|
docker run --rm \
|
|
-v "${{ github.workspace }}:/src" \
|
|
cdrx/pyinstaller-windows
|
|
|
|
# This image outputs to dist/windows/ by default
|
|
if [ -f "dist/windows/tamigo-cli.exe" ]; then
|
|
cp dist/windows/tamigo-cli.exe output_dist/
|
|
elif [ -f "dist/tamigo-cli.exe" ]; then
|
|
cp dist/tamigo-cli.exe output_dist/
|
|
fi
|
|
|
|
- name: Debug - Comprehensive Search
|
|
if: always()
|
|
run: |
|
|
echo "Current directory tree:"
|
|
find . -maxdepth 3 -not -path '*/.*'
|
|
echo "Searching for any .exe:"
|
|
find . -name "*.exe"
|
|
|
|
- name: Upload Windows Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: binary-windows
|
|
path: "**/*.exe"
|