Files
cardconjurer/.github/workflows/build.yml
2022-11-21 20:34:41 -06:00

49 lines
1.3 KiB
YAML

# credit: https://data-dive.com/multi-os-deployment-in-cloud-using-pyinstaller-and-github-actions
name: Card Cojurer (server)
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
build:
name: Build packages
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
include:
- os: macos-latest
TARGET: macos
- os: windows-latest
TARGET: windows
- os: ubuntu-latest
TARGET: linux
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.2.2
- name: Install dependencies
run: |
poetry install --no-interaction
- name: Build with PyInstaller
run: |
poetry run pyinstaller launcher.spec
- name: Upload artifact Windows
if: matrix.os == "windows-latest"
uses: actions/upload-artifact@v2
with:
path: ./dist/launcher.exe
name: CC Server (${{ matrix.TARGET }})
- name: Upload artifact macos
if: matrix.os != "windows-latest"
uses: actions/upload-artifact@v2
with:
path: ./dist/launcher
name: CC Server (${{ matrix.TARGET }})