Updated documentation #58
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nuitka build | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
permissions: | |
contents: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ macos-12, ubuntu-20.04, ubuntu-22.04, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 # Check-out repository | |
- uses: actions/setup-python@v4 # Setup Python | |
with: | |
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
- name: Pip install requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build python script into a stand-alone binary (ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
uses: Nuitka/Nuitka-Action@main | |
with: | |
working-directory: src | |
nuitka-version: main | |
script-name: bgtrainer/bgtrainer.py | |
include-data-dir: bgtrainer/data=bgtrainer/data | |
onefile: true | |
output-file: bgtrainer_${{ matrix.os }}.bin | |
- name: Build python script into a stand-alone binary (macOS) | |
if: startsWith(matrix.os, 'macos') | |
uses: Nuitka/Nuitka-Action@main | |
with: | |
working-directory: src | |
nuitka-version: main | |
script-name: bgtrainer/bgtrainer.py | |
include-data-dir: bgtrainer/data=bgtrainer/data | |
onefile: true | |
output-file: bgtrainer_${{ matrix.os }} | |
- name: Build python script into a directory (Windows) | |
if: startsWith(matrix.os, 'windows') | |
uses: Nuitka/Nuitka-Action@main | |
with: | |
working-directory: src | |
nuitka-version: main | |
script-name: bgtrainer/bgtrainer.py | |
include-data-dir: bgtrainer/data=bgtrainer/data | |
onefile: false | |
- name: Zip directory (Windows only) | |
if: matrix.os == 'windows-latest' | |
uses: thedoctor0/[email protected] | |
with: | |
directory: 'src/build/bgtrainer.dist' | |
type: 'zip' | |
path: '.' | |
filename: '../bgtrainer_${{ matrix.os }}' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }} build | |
path: src/build/bgtrainer_${{ matrix.os }}* | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: src/build/bgtrainer_${{ matrix.os }}* |