Skip to content

Commit 0309375

Browse files
Update build-exe.yml
1 parent f223fec commit 0309375

1 file changed

Lines changed: 32 additions & 16 deletions

File tree

.github/workflows/build-exe.yml

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
# This workflow builds a standalone Python executable for Windows using Nuitka
2+
# and attaches it to a new GitHub Release.
3+
14
name: Build Python Executable with Nuitka
25

36
on:
47
release:
5-
types: [created]
8+
types: [created] # This workflow runs automatically whenever a new release is published.
69

710
jobs:
811
build:
912
runs-on: windows-latest
1013
permissions:
11-
contents: write
14+
contents: write # Required to write the release asset.
1215

1316
steps:
1417
- name: Checkout repository
@@ -26,27 +29,40 @@ jobs:
2629
uses: Nuitka/Nuitka-Action@main
2730
with:
2831
nuitka-version: main
29-
script-name: PICA_Launcher_V4.py
30-
# --- CORRECTED FLAGS BELOW ---
31-
onefile: "yes" # This implies standalone
32-
windows-disable-console: "yes"
32+
33+
# --- CORRECTED FLAGS AND INPUTS BELOW ---
34+
35+
# Nuitka command-line arguments are passed directly with the script name.
36+
# We add --onefile to create a single executable.
37+
script-name: PICA_Launcher_V4.py --onefile
38+
39+
# 'disable-console' is the correct input for the action to hide the command window.
40+
disable-console: true
41+
42+
# Specify the output directory to keep the project root clean.
43+
output-dir: build
44+
45+
# This is a valid action input. Ensure the path is correct from the repo root.
3346
windows-icon-from-ico: _assets/LOGO/UGC_DAE_CSR.ico
47+
48+
# For including data directories, the format is source=destination.
49+
# This copies the entire folder into the build at the specified destination path.
3450
include-data-dir: |
35-
_assets
36-
Delta_mode
37-
Keithley_2400
38-
Keithley_2400_Keithley_2182
39-
Keithley_6517B
40-
LCR_Keysight_E4980A
41-
Lakeshore_350_340
42-
Lock_in_amplifier
43-
Utilities
51+
_assets=_assets
52+
Delta_mode=Delta_mode
53+
Keithley_2400=Keithley_2400
54+
Keithley_2400_Keithley_2182=Keithley_2400_Keithley_2182
55+
Keithley_6517B=Keithley_6517B
56+
LCR_Keysight_E4980A=LCR_Keysight_E4980A
57+
Lakeshore_350_340=Lakeshore_350_340
58+
Lock_in_amplifier=Lock_in_amplifier
59+
Utilities=Utilities
4460
4561
- name: Upload Executable to Release
4662
uses: svenstaro/upload-release-action@v2
4763
with:
4864
repo_token: ${{ secrets.GITHUB_TOKEN }}
49-
# Nuitka onefile build places the .exe directly in the `build` folder
65+
# The file path now correctly points to the output directory we specified.
5066
file: build/PICA_Launcher_V4.exe
5167
asset_name: PICA_Launcher-Windows-${{ github.ref_name }}.exe
5268
tag: ${{ github.ref }}

0 commit comments

Comments
 (0)