diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4aaa855..2587c23 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -35,40 +35,33 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Build Windows executable (Manual Build) + - name: Build Windows executable (Standard CDRX) run: | - CONTAINER_NAME="win-builder-${{ github.run_id }}" - docker rm -f $CONTAINER_NAME || true + # 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 - # 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" + docker run --rm \ + -v "${{ github.workspace }}:/src" \ + cdrx/pyinstaller-windows - # 2. Copy source code into the container - docker cp . $CONTAINER_NAME:/src + # 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 - # 3. Run the build - echo "Starting Windows build inside Docker..." - docker start -a $CONTAINER_NAME - - # 4. Extract results - echo "Extracting results from container..." - mkdir -p final_dist - # 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 - List final files + - name: Debug - Comprehensive Search + if: always() run: | - echo "Contents of final_dist:" - ls -R final_dist/ || echo "final_dist is empty" - echo "Finding all .exe files in workspace:" + 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: final_dist/*.exe + path: "**/*.exe"