Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 401cc652a2 | |||
| 2658b5f5bf | |||
| 723e8d7b6e | |||
| 77bbd35d5a |
1 changed files with 15 additions and 14 deletions
|
|
@ -7,19 +7,18 @@ on:
|
|||
jobs:
|
||||
build-linux:
|
||||
name: Build Linux
|
||||
runs-on: ubuntu-main-runner
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install system dependencies (Tkinter)
|
||||
# В Ubuntu для работы Tkinter необходим системный пакет python3-tk
|
||||
run: sudo apt-get update && sudo apt-get install -y python3-tk
|
||||
run: apt-get update && apt-get install -y python3-tk
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
|
|
@ -28,7 +27,6 @@ jobs:
|
|||
pip install pyinstaller
|
||||
|
||||
- name: Build Linux executable
|
||||
# Флаг --windowed убирает консоль, --onefile собирает все в один файл
|
||||
run: pyinstaller --onefile --windowed --name factorio-mod-sync-linux main.py
|
||||
|
||||
- name: Upload Linux artifact
|
||||
|
|
@ -39,13 +37,15 @@ jobs:
|
|||
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
runs-on: ubuntu-main-runner
|
||||
# Используем контейнер с настроенным Wine и Python 3.11 под Windows
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: tobix/pywine:3.11
|
||||
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@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python dependencies (Windows)
|
||||
run: |
|
||||
|
|
@ -65,17 +65,18 @@ jobs:
|
|||
release-assets:
|
||||
name: Upload Assets to Release
|
||||
needs: [build-linux, build-windows]
|
||||
runs-on: ubuntu-main-runner
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Add files to Forgejo Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: https://github.com/softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
linux-build/factorio-mod-sync-linux
|
||||
windows-build/factorio-mod-sync-windows.exe
|
||||
artifacts/linux-build/factorio-mod-sync-linux
|
||||
artifacts/windows-build/factorio-mod-sync-windows.exe
|
||||
env:
|
||||
# В Forgejo GITHUB_TOKEN автоматически мапится на внутренний токен доступа
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Reference in a new issue