Compare commits
3 commits
main
...
image-test
| Author | SHA1 | Date | |
|---|---|---|---|
| 87f661f2a6 | |||
| a3a944b9c8 | |||
| ab82ba74e2 |
1 changed files with 15 additions and 19 deletions
|
|
@ -1,6 +1,7 @@
|
|||
name: Build and Publish Release
|
||||
|
||||
on:
|
||||
push:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
|
|
@ -8,23 +9,20 @@ jobs:
|
|||
build-linux:
|
||||
name: Build Linux
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: git.borderban.ru/borderban/ci-images/py-builder:latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install system dependencies (Tkinter)
|
||||
run: apt-get update && apt-get install -y python3-tk
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Build Linux executable
|
||||
run: pyinstaller --onefile --windowed --name factorio-mod-sync-linux main.py
|
||||
|
|
@ -39,22 +37,20 @@ jobs:
|
|||
name: Build Windows
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tobix/pywine:3.11
|
||||
image: git.borderban.ru/borderban/ci-images/py-builder:latest
|
||||
steps:
|
||||
- name: Install Node.js and Git (required for Actions)
|
||||
run: apt-get update && apt-get install -y nodejs git
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python dependencies (Windows)
|
||||
# Используем новый гарантированный путь из нашего Dockerfile (C:\python311)
|
||||
run: |
|
||||
wine python -m pip install --upgrade pip
|
||||
wine pip install -r requirements.txt
|
||||
wine pip install pyinstaller
|
||||
xvfb-run wine "C:\python311\python.exe" -m pip install -r requirements.txt
|
||||
|
||||
- name: Build Windows executable
|
||||
run: wine pyinstaller --onefile --windowed --name factorio-mod-sync-windows.exe main.py
|
||||
# Теперь PyInstaller вызывается через гарантированно существующий экзешник
|
||||
run: |
|
||||
xvfb-run wine "C:\python311\python.exe" -m PyInstaller --onefile --windowed --name factorio-mod-sync-windows main.py
|
||||
|
||||
- name: Upload Windows artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
|
|
@ -66,7 +62,7 @@ jobs:
|
|||
name: Upload Assets to Release
|
||||
needs: [build-linux, build-windows]
|
||||
runs-on: ubuntu-latest
|
||||
if: always() && (needs.build-linux.result == 'success' || needs.build-windows.result == 'success')
|
||||
if: github.event_name == 'release' || github.event_name == 'push'
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
|
|
|
|||
Loading…
Reference in a new issue