client-py/.gitea/workflows/release.yml
borderban 401cc652a2
All checks were successful
Build and Publish Release / Build Linux (release) Successful in 3m0s
Build and Publish Release / Build Windows (release) Successful in 4m37s
Build and Publish Release / Upload Assets to Release (release) Successful in 11s
edit final
2026-05-02 17:51:31 +05:00

82 lines
No EOL
2.3 KiB
YAML

name: Build and Publish Release
on:
release:
types: [published]
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install system dependencies (Tkinter)
run: apt-get update && apt-get install -y python3-tk
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build Linux executable
run: pyinstaller --onefile --windowed --name factorio-mod-sync-linux main.py
- name: Upload Linux artifact
uses: actions/upload-artifact@v3
with:
name: linux-build
path: dist/factorio-mod-sync-linux
build-windows:
name: Build 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@v4
- name: Install Python dependencies (Windows)
run: |
wine python -m pip install --upgrade pip
wine pip install -r requirements.txt
wine pip install pyinstaller
- name: Build Windows executable
run: wine pyinstaller --onefile --windowed --name factorio-mod-sync-windows.exe main.py
- name: Upload Windows artifact
uses: actions/upload-artifact@v3
with:
name: windows-build
path: dist/factorio-mod-sync-windows.exe
release-assets:
name: Upload Assets to Release
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Add files to Forgejo Release
uses: https://github.com/softprops/action-gh-release@v2
with:
files: |
artifacts/linux-build/factorio-mod-sync-linux
artifacts/windows-build/factorio-mod-sync-windows.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}