Workflow: Use manual docker build/cp for Windows to ensure reliability
All checks were successful
Build Tamigo CLI / Build Linux Binary (push) Successful in 51s
Build Tamigo CLI / Build Windows Binary (push) Successful in 15s

This commit is contained in:
Daniel Dybing
2026-03-11 15:26:04 +01:00
parent 8d2ac1c4e4
commit 3eb2b8319d

View File

@@ -35,32 +35,36 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build Windows executable via Docker (Manual Extraction)
- name: Build Windows executable (Manual Build)
run: |
CONTAINER_NAME="win-builder-${{ github.run_id }}"
# 1. Create a container from a reliable Wine+Python 3.10 image
docker create --name $CONTAINER_NAME cdrx/pyinstaller-windows
docker rm -f $CONTAINER_NAME || true
# 1. Create the container with a custom build command
# We upgrade pyinstaller to fix the WinError 123 bug
docker create --name $CONTAINER_NAME --workdir /src cdrx/pyinstaller-windows sh -c "pip install --upgrade pyinstaller && pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
# 2. Copy source code into the container
docker cp . $CONTAINER_NAME:/src
# 3. Run the build process manually inside the container
# We upgrade pyinstaller and run the build
docker start -a $CONTAINER_NAME || echo "Container finished"
# 3. Run the build
echo "Starting Windows build inside Docker..."
docker start -a $CONTAINER_NAME
# 4. Extract the result
# PyInstaller in this image puts output in /src/dist/windows/ by default
# 4. Extract results
echo "Extracting results from container..."
mkdir -p final_dist
docker cp $CONTAINER_NAME:/src/dist/windows/tamigo-cli.exe ./final_dist/tamigo-cli.exe || \
docker cp $CONTAINER_NAME:/src/dist/tamigo-cli.exe ./final_dist/tamigo-cli.exe || \
echo "Could not find EXE in standard locations"
# We copy the entire dist folder to be safe
docker cp $CONTAINER_NAME:/src/dist/. ./final_dist/ || echo "Warning: Could not copy dist folder"
# 5. Cleanup
docker rm $CONTAINER_NAME
- name: Debug - Verify final file
- name: Debug - List final files
run: |
ls -R final_dist/
echo "Contents of final_dist:"
ls -R final_dist/ || echo "final_dist is empty"
echo "Finding all .exe files in workspace:"
find . -name "*.exe"
- name: Upload Windows Artifact