-
-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (80 loc) · 3.34 KB
/
nuitka.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
87
88
name: Build dcspy binary with Nuitka
on: workflow_call
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
nuitka_type: [ dcspy_nuitka, dcspy_nuitka_cli ]
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Set up Python 3.12"
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: "Install requirements"
shell: bash
run: |
python -m pip install -U pip
python -m pip install -U -r requirements.txt
- name: "Generate version info file"
shell: pwsh
id: nuitka_data
run: |
python -m pip install -U pyinstaller
$output = & python scripts/generate_ver_file.py
$output = $output -replace "[\(\)\s\']", ""
$values = $output.Split(',')
$ref_name = $values[0].Trim()
$run_number = $values[1].Trim()
$sha = $values[2].Trim()
Write-Output "git_ref_name=$ref_name" >> $env:GITHUB_OUTPUT
Write-Output "git_run_number=$run_number" >> $env:GITHUB_OUTPUT
Write-Output "git_sha=$sha" >> $env:GITHUB_OUTPUT
- uses: Nuitka/Nuitka-Action@main
if: ${{ endsWith( matrix.nuitka_type, '_nuitka') }}
with:
nuitka-version: 2.4.11
script-name: src/dcs_py.py
onefile: true
windows-console-mode: disable
prefer-source-code: true
enable-plugins: pyside6
include-package-data: dcspy
assume-yes-for-downloads: true
onefile-windows-splash-screen-image: src/dcspy/img/splash.png
output-file: ${{ matrix.nuitka_type }}
output-dir: dist
windows-icon-from-ico: src/dcspy/img/dcspy_white.ico
product-name: DCSpy
file-version: ${{ steps.nuitka_data.outputs.git_ref_name }}.${{ steps.nuitka_data.outputs.git_run_number }}
product-version: ${{ steps.nuitka_data.outputs.git_ref_name }}.${{ steps.nuitka_data.outputs.git_sha }}
file-description: Integrating DCS Planes with Logitech keyboards with LCD
copyright: (c) 2024 Michal Plichta. All rights reserved.
- uses: Nuitka/Nuitka-Action@main
if: ${{ endsWith( matrix.nuitka_type, '_cli') }}
with:
nuitka-version: 2.4.11
script-name: src/dcs_py.py
onefile: true
windows-console-mode: force
prefer-source-code: true
enable-plugins: pyside6
include-package-data: dcspy
assume-yes-for-downloads: true
onefile-windows-splash-screen-image: src/dcspy/img/splash.png
output-file: ${{ matrix.nuitka_type }}
output-dir: dist
windows-icon-from-ico: src/dcspy/img/dcspy_white.ico
product-name: DCSpy
file-version: ${{ steps.nuitka_data.outputs.git_ref_name }}.${{ steps.nuitka_data.outputs.git_run_number }}
product-version: ${{ steps.nuitka_data.outputs.git_ref_name }}.${{ steps.nuitka_data.outputs.git_sha }}
file-description: Integrating DCS Planes with Logitech keyboards with LCD
copyright: (c) 2024 Michal Plichta. All rights reserved.
- name: "Upload dcspy binaries"
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.nuitka_type }}_nuitka
path: dist/${{ matrix.nuitka_type }}.exe