55 branches :
66 - master
77
8+ permissions :
9+ contents : write
10+
811jobs :
912 build-windows :
1013 name : Build on Windows
@@ -13,10 +16,10 @@ jobs:
1316 contents : write
1417 steps :
1518 - name : Checkout code
16- uses : actions/checkout@v4
19+ uses : actions/checkout@v6
1720
1821 - name : Set up Python
19- uses : actions/setup-python@v5
22+ uses : actions/setup-python@v6
2023 with :
2124 python-version : ' 3.x'
2225
@@ -26,72 +29,17 @@ jobs:
2629 pip install pyinstaller
2730 pip install -r requirements.txt
2831
29- - name : Generate PyInstaller spec file
30- run : |
31- $specContent = @"
32- # -*- mode: python ; coding: utf-8 -*-
33-
34- a = Analysis(
35- ['optimuspy.py'],
36- pathex=[],
37- binaries=[],
38- datas=[('execution_mode.py', '.'), ('executors.py', '.'), ('results.py', '.')],
39- hiddenimports=['seaborn', 'execution_mode', 'executors', 'results','win32timezone'],
40- hookspath=[],
41- hooksconfig={},
42- runtime_hooks=[],
43- excludes=[],
44- noarchive=False,
45- optimize=0,
46- )
47- pyz = PYZ(a.pure)
48-
49- exe = EXE(
50- pyz,
51- a.scripts,
52- a.binaries,
53- a.datas,
54- [],
55- name='optimuspy',
56- debug=False,
57- bootloader_ignore_signals=False,
58- strip=False,
59- upx=True,
60- upx_exclude=[],
61- runtime_tmpdir=None,
62- console=True,
63- disable_windowed_traceback=False,
64- argv_emulation=False,
65- target_arch=None,
66- codesign_identity=None,
67- entitlements_file=None,
68- )
69- "@
70- Set-Content -Path "optimuspy.spec" -Value $specContent
71-
7232 - name : Build executable
7333 run : pyinstaller optimuspy.spec
7434
75- - name : Upload executable artifact
76- uses : actions/upload-artifact@v4
77- with :
78- name : optimuspy-windows
79- path : dist/optimuspy.exe
80- retention-days : 180
35+ - name : Get short SHA
36+ id : sha
37+ run : echo "short=$(git rev-parse --short HEAD)" >> $env:GITHUB_OUTPUT
8138
82- - name : Attach to latest release
39+ - name : Create Release
8340 uses : softprops/action-gh-release@v2
8441 with :
42+ tag_name : build-${{ steps.sha.outputs.short }}
43+ name : Build ${{ steps.sha.outputs.short }}
44+ body : " Automated build from commit ${{ github.sha }}"
8545 files : dist/optimuspy.exe
86- tag_name : latest
87- name : Latest Build
88- body : |
89- Latest Windows executable build from master branch.
90-
91- **Download:** optimuspy.exe
92-
93- This executable is automatically built and updated on every merge to master.
94- draft : false
95- prerelease : false
96- env :
97- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments