-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (62 loc) · 2.57 KB
/
build-exe.yml
File metadata and controls
77 lines (62 loc) · 2.57 KB
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
# This workflow builds a standalone Python executable for Windows using Nuitka
# and attaches it to a new GitHub Release.
name: Build Python Executable
on:
release:
types: [created] # This workflow runs automatically whenever a new release is published.
jobs:
build:
runs-on: windows-latest
permissions:
contents: write # Required to write the release asset.
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install Dependencies
# A stable requirements file is the foundation of a reliable build.
run: pip install -r requirements.txt
- name: Build with Nuitka
# --- THE FINAL, POLISHED CONFIGURATION ---
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: '2.6'
msvc: 'latest'
# Nuitka 2.6+ auto-detects numpy, pandas, and qt.
# We only need tk-inter as a hint for the standard library.
enable-plugins: "tk-inter"
script-name: PICA_Launcher_V5p1.py
# The 'deployment' flag handles a one-file build.
deployment: true
# Use the modern option to disable the console.
windows-console-mode: 'disable'
windows-icon-from-ico: _assets/LOGO/UGC_DAE_CSR.ico
# These directories MUST exist in your GitHub repository and not be empty.
include-data-dir: |
_assets=_assets/
Delta_mode_Keithley_6221_2182A=Delta_mode_Keithley_6221_2182A/
Keithley_2400=Keithley_2400/
Keithley_2400_Keithley_2182=Keithley_2400_Keithley_2182/
Keithley_6517B=Keithley_6517B/
LCR_Keysight_E4980A=LCR_Keysight_E4980A/
Lakeshore_350_340=Lakeshore_350_340/
Lock_in_amplifier=Lock_in_amplifier/
Utilities=Utilities/
include-data-files: |
LICENSE=LICENSE
README.md=README.md
# We explicitly tell Nuitka to put the output here.
output-dir: build
- name: Upload Executable to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
# --- CORRECTED FILE PATH BELOW ---
# The file is inside the 'build' directory we specified above.
file: build/PICA_Launcher_V5p1.exe
asset_name: PICA_Launcher-v${{ github.ref_name }}.exe
tag: ${{ github.ref }}
overwrite: true