-
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.19 KB
/
python-distribution.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
name: Python Distribution
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
# Windows is currently the only platform this action supports
runs-on: windows-latest
steps:
# Check-out repository
- uses: actions/checkout@v3
# Setup Python
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install Dependencies
run: |
pip install -r requirements.txt
- name: Compile GUI
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: gui.py
enable-plugins: tk-inter
windows-icon-from-ico: assets/kozmadeus.ico
include-package: modules
disable-console: true
enable-console: false
mode: standalone
- name: Compile CLI
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: cli.py
windows-icon-from-ico: assets/kozmadeus.ico
include-package: modules
mode: standalone
- name: Prepare Compiled Distributions
run: |
mkdir build/artifact/Kozmadeus
echo Merging CLI and GUI into one artifact...
Copy-Item -Force build/cli.dist/* build/artifact/Kozmadeus
Copy-Item -Force build/gui.dist/* build/artifact/Kozmadeus
Rename-Item build/artifact/Kozmadeus/gui.exe kozmadeus-gui.exe
Rename-Item build/artifact/Kozmadeus/cli.exe kozmadeus-cli.exe
echo Appending necessary assets...
Copy-Item -Force -Recurse assets build/artifact/Kozmadeus
Copy-Item -Force -Recurse templates build/artifact/Kozmadeus
Copy-Item -Force -Recurse docs build/artifact/Kozmadeus
Copy-Item README.md build/artifact/Kozmadeus
Copy-Item LICENSE.md build/artifact/Kozmadeus
# Uploads artifact
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build (windows-latest)
path: build/artifact