Build: Use Docker for Windows cross-compilation on Linux workers
This commit is contained in:
@@ -34,26 +34,20 @@ jobs:
|
||||
path: dist/tamigo-cli
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
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
|
||||
- name: Build Windows executable via Docker
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build with PyInstaller
|
||||
run: |
|
||||
pyinstaller --onefile --name tamigo-cli tamigo.py
|
||||
docker run --rm \
|
||||
-v "$(pwd):/src" \
|
||||
cdrx/pyinstaller-windows \
|
||||
"pip install -r requirements.txt && pyinstaller --onefile --name tamigo-cli tamigo.py"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: tamigo-cli-windows
|
||||
path: dist/tamigo-cli.exe
|
||||
# The Docker image puts the output in dist/windows/
|
||||
path: dist/windows/tamigo-cli.exe
|
||||
|
||||
Reference in New Issue
Block a user