mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-23 06:19:16 +01:00
96 lines
2.6 KiB
YAML
96 lines
2.6 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
release:
|
|
types:
|
|
- created
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
# build-fw-hw-sw:
|
|
# runs-on: ubuntu-latest
|
|
|
|
# steps:
|
|
# - name: Git checkout
|
|
# uses: actions/checkout@v3
|
|
|
|
# - name: Build script
|
|
# run: ./docker_build.sh release --force-clean
|
|
|
|
# - name: Upload artifact
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: SC64
|
|
# path: SC64.zip
|
|
|
|
# - name: Upload release assets
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# uses: softprops/action-gh-release@v0.1.15
|
|
# with:
|
|
# files: SC64.zip
|
|
|
|
build-apps:
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
include:
|
|
- os: windows-latest
|
|
name: sc64-windows
|
|
options: --console --icon ../../assets/sc64_logo_256_256.png
|
|
package: tar.exe -C dist -a -c -f package/sc64-windows.zip .
|
|
- os: ubuntu-latest
|
|
name: sc64-linux
|
|
package: tar -C dist -czf package/sc64-linux.tgz .
|
|
- os: macos-latest
|
|
name: sc64-macos
|
|
options: --console --icon ../../assets/sc64_logo_256_256.png
|
|
package: tar -C dist -czf package/sc64-macos.tgz .
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Git checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Install python requirements
|
|
run: pip install -r requirements.txt pyinstaller
|
|
working-directory: sw/pc
|
|
|
|
- name: Create sc64 executable
|
|
run: pyinstaller --clean --onefile ${{ matrix.options }} sc64.py
|
|
working-directory: sw/pc
|
|
|
|
- name: Package executable
|
|
run: |
|
|
mkdir package
|
|
${{ matrix.package }}
|
|
working-directory: sw/pc
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.name }}
|
|
path: sw/pc/package/*
|
|
|
|
# - name: Zip release executables
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# run: ${{ matrix.zip }} ${{ matrix.name }}.zip *
|
|
# working-directory: sw/pc/dist
|
|
|
|
# - name: Upload release assets
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# uses: softprops/action-gh-release@v0.1.15
|
|
# with:
|
|
# files: sw/pc/dist/${{ matrix.name }}.zip
|