Files
shatterstack/.github/workflows/main.yml
2025-05-18 15:50:11 +02:00

75 lines
2.3 KiB
YAML

name: Build and Release
on: push
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Build Executable
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: run.py
nofollow-import-to: "*tk*,_codecs,encodings,multiprocessing,gi"
disable-plugins: tk-inter,dill-compat,eventlet,gevent,pyqt5,pyqt6,pyside2,pyside6,delvewheel,pywebview,matplotlib,spacy,enum-compat,pbr-compat,gevent,pmw-freezer,transformers,upx,kivy,options-nanny,multiprocessing,gi
include-data-dir: assets=assets
include-data-files: CREDITS=CREDITS
mode: standalone
output-file: ShatterStack
- name: Zip Build Output
run: |
mkdir -p zip_output
zip -r "zip_output/ShatterStack-${{ runner.os }}.zip" build/run.dist
- name: Upload Zipped Build Artifact
uses: actions/upload-artifact@v4
with:
name: ShatterStack-${{ runner.os }}
path: zip_output/ShatterStack-${{ runner.os }}.zip
release:
name: Create GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download All Zipped Builds
uses: actions/download-artifact@v4
with:
path: downloads
- name: Install GitHub CLI
uses: cli/cli-action@v2
- name: Delete Old Release (if exists)
continue-on-error: true
run: gh release delete latest -y
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create New "Latest Build" Release
run: gh release create latest downloads/**/ShatterStack-*.zip --title "Latest Build" --notes "Most recent multi-platform builds of ShatterStack" --prerelease
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}