build test
Some checks failed
Build and Publish Release / Build Windows (push) Failing after 46s
Build and Publish Release / Upload Assets to Release (push) Has been cancelled
Build and Publish Release / Build Linux (push) Has been cancelled

This commit is contained in:
borderban 2026-05-04 20:19:08 +05:00
parent ab82ba74e2
commit a3a944b9c8

View file

@ -1,7 +1,7 @@
name: Build and Publish Release name: Build and Publish Release
on: on:
push: # Для теста лучше использовать push, чтобы не создавать релиз каждый раз push: # Оставил для тестов, потом можно закомментировать
release: release:
types: [published] types: [published]
@ -15,7 +15,6 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
# Кэшируем pip, чтобы не качать зависимости из requirements.txt каждый раз
- name: Cache pip - name: Cache pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -44,15 +43,14 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Python dependencies (Windows) - name: Install Python dependencies (Windows)
# Устанавливаем зависимости именно во внутренний Python внутри Wine
run: | run: |
# В твоем образе py-builder мы ставим пакеты обычно, xvfb-run wine "C:\Program Files\Python311\python.exe" -m pip install -r requirements.txt
# а pyinstaller упакует их под Windows благодаря Wine внутри
pip install -r requirements.txt
- name: Build Windows executable - name: Build Windows executable
# Внутри твоего контейнера вызывай сборку. # Используем xvfb-run и прямой путь к исполняемому файлу
# Если в образе настроен wine как алиас или через него — используй его. run: |
run: wine pyinstaller --onefile --windowed --name factorio-mod-sync-windows.exe main.py xvfb-run wine "C:\Program Files\Python311\python.exe" -m PyInstaller --onefile --windowed --name factorio-mod-sync-windows main.py
- name: Upload Windows artifact - name: Upload Windows artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@ -64,8 +62,8 @@ jobs:
name: Upload Assets to Release name: Upload Assets to Release
needs: [build-linux, build-windows] needs: [build-linux, build-windows]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Этот шаг запустится только если это реально Релиз # Запускается при создании релиза или если ты вручную нажал push (для теста)
if: github.event_name == 'release' if: github.event_name == 'release' || github.event_name == 'push'
steps: steps:
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -73,6 +71,7 @@ jobs:
path: artifacts path: artifacts
- name: Add files to Forgejo Release - name: Add files to Forgejo Release
# Для Forgejo лучше использовать нативный action или проверь совместимость этого
uses: https://github.com/softprops/action-gh-release@v2 uses: https://github.com/softprops/action-gh-release@v2
with: with:
fail_on_unmatched_files: false fail_on_unmatched_files: false