mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
Update and modernize create-executables action (#138)
* Modernize create-executables.yml * Update version numbers * Fix API version in test
This commit is contained in:
@@ -1,38 +1,66 @@
|
||||
name: Create Executables
|
||||
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
- types: [created]
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
pyinstaller-build-windows:
|
||||
runs-on: windows-latest
|
||||
build:
|
||||
name: Build executables (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-latest
|
||||
artifact_suffix: windows
|
||||
- os: ubuntu-latest
|
||||
artifact_suffix: linux
|
||||
- os: macos-latest
|
||||
artifact_suffix: macos
|
||||
|
||||
steps:
|
||||
- name: Create Executables (Windows)
|
||||
uses: sayyid5416/pyinstaller@v1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python_ver: '3.11'
|
||||
spec: 'client.spec'
|
||||
requirements: 'requirements.txt'
|
||||
upload_exe_with_name: 'Zordon'
|
||||
pyinstaller-build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create Executables (Linux)
|
||||
uses: sayyid5416/pyinstaller@v1
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Linux system dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libxcb-cursor0 libxcb-xinerama0
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip wheel setuptools
|
||||
python -m pip install -r requirements.txt
|
||||
python -m pip install pyinstaller pyinstaller_versionfile
|
||||
|
||||
- name: Build client
|
||||
run: pyinstaller --clean client.spec
|
||||
|
||||
- name: Build server
|
||||
run: pyinstaller --clean server.spec
|
||||
|
||||
- name: Upload client artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
python_ver: '3.11'
|
||||
spec: 'client.spec'
|
||||
requirements: 'requirements.txt'
|
||||
upload_exe_with_name: 'Zordon'
|
||||
pyinstaller-build-macos:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Create Executables (macOS)
|
||||
uses: sayyid5416/pyinstaller@v1
|
||||
name: Zordon-client-${{ matrix.artifact_suffix }}
|
||||
path: |
|
||||
dist/Zordon-client
|
||||
dist/Zordon-client.exe
|
||||
dist/Zordon-client.app
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload server artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
python_ver: '3.11'
|
||||
spec: 'client.spec'
|
||||
requirements: 'requirements.txt'
|
||||
upload_exe_with_name: 'Zordon'
|
||||
name: Zordon-server-${{ matrix.artifact_suffix }}
|
||||
path: |
|
||||
dist/Zordon-server
|
||||
dist/Zordon-server.exe
|
||||
dist/Zordon-server.app
|
||||
if-no-files-found: error
|
||||
|
||||
Reference in New Issue
Block a user