-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (71 loc) · 2.57 KB
/
nuitkabuild.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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 }}*