mirror of
https://github.com/Polprzewodnikowy/SummerCart64.git
synced 2024-11-30 09:04:14 +01:00
109 lines
2.8 KiB
YAML
109 lines
2.8 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: Get release
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# id: get_release
|
|
# uses: bruceadams/get-release@v1.3.2
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
# - name: Upload release asset
|
|
# if: github.event_name == 'release' && github.event.action == 'created'
|
|
# uses: actions/upload-release-asset@v1 # This will start failing soon due to needing node 12!
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ github.token }}
|
|
# with:
|
|
# upload_url: ${{ steps.get_release.outputs.upload_url }}
|
|
# asset_path: SC64.zip
|
|
# asset_name: SC64.zip
|
|
# asset_content_type: application/zip
|
|
|
|
build-executables:
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, ubuntu-latest, macos-latest]
|
|
include:
|
|
- os: windows-latest
|
|
artifact: Apps-Windows
|
|
zip: tar.exe -a -c -f
|
|
- os: ubuntu-latest
|
|
artifact: Apps-Linux
|
|
zip: zip -r
|
|
- os: macos-latest
|
|
artifact: Apps-macOS
|
|
zip: zip -r
|
|
|
|
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 --onefile sc64.py
|
|
working-directory: sw/pc
|
|
|
|
- name: Create primer executable
|
|
run: pyinstaller --onefile primer.py
|
|
working-directory: sw/pc
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.artifact }}
|
|
path: sw/pc/dist/*
|
|
|
|
- name: Zip executables
|
|
run: ${{ matrix.zip }} ${{ matrix.artifact }}.zip *
|
|
working-directory: sw/pc/dist
|
|
|
|
- name: TEST
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.artifact }}-test
|
|
path: sw/pc/dist/${{ matrix.artifact }}.zip
|
|
|
|
- name: Upload release assets
|
|
uses: softprops/action-gh-release@v0.1.15
|
|
if: github.event_name == 'release' && github.event.action == 'created'
|
|
with:
|
|
files: sw/pc/dist/${{ matrix.artifact }}.zip
|