1- name : Build and Lint
1+ name : Build and Release
22
33on :
44 push :
@@ -33,12 +33,14 @@ jobs:
3333 python -c "import glob, py_compile, os; [py_compile.compile(f, doraise=True) for f in glob.glob('ui/**/*.py', recursive=True)]"
3434 python -c "import glob, py_compile, os; [py_compile.compile(f, doraise=True) for f in glob.glob('SexyUIExtensions/**/*.py', recursive=True)]"
3535
36- build :
36+ build-windows :
3737 name : Windows Build (Nuitka)
3838 runs-on : windows-latest
3939 needs : lint
4040 steps :
4141 - uses : actions/checkout@v4
42+ with :
43+ lfs : true
4244
4345 - name : Set up Python 3.11
4446 uses : actions/setup-python@v5
5860 --company-name=StackAndPointer --product-name=SexyUIEditor^
5961 --file-description="SexyUI ^& PVZ UI Editor"^
6062 --copyright="Copyright (C) 2026 StackAndPointer"^
61- --file-version=1.1 .0.0 --product-version=1.1 .0.0^
63+ --file-version=1.2 .0.0 --product-version=1.2 .0.0^
6264 --windows-icon-from-ico=resources\icons\icon.ico^
6365 --windows-console-mode=disable^
6466 --enable-plugin=pyqt6^
@@ -75,40 +77,182 @@ jobs:
7577 --assume-yes-for-downloads --show-progress main.py
7678 shell : cmd
7779
80+ - name : Copy resource directories
81+ run : |
82+ if (Test-Path "Content") { Copy-Item -Path "Content" -Destination "dist\main.dist\Content" -Recurse }
83+ if (Test-Path "pak") { Copy-Item -Path "pak" -Destination "dist\main.dist\pak" -Recurse }
84+ shell : pwsh
85+
7886 - name : Upload build artifact
7987 uses : actions/upload-artifact@v4
8088 with :
8189 name : SexyUIEditor-Windows
8290 path : dist/main.dist/
8391
92+ build-linux :
93+ name : Linux Build (Nuitka)
94+ runs-on : ubuntu-latest
95+ needs : lint
96+ steps :
97+ - uses : actions/checkout@v4
98+ with :
99+ lfs : true
100+
101+ - name : Set up Python 3.11
102+ uses : actions/setup-python@v5
103+ with :
104+ python-version : " 3.11"
105+
106+ - name : Install system dependencies
107+ run : |
108+ sudo apt-get update
109+ sudo apt-get install -y libgl1-mesa-glx libglib2.0-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxkbcommon-x11-0 libdbus-1-3 libegl1
110+
111+ - name : Install Python dependencies
112+ run : |
113+ python -m pip install --upgrade pip
114+ pip install -r requirements.txt
115+ pip install nuitka
116+
117+ - name : Build with Nuitka
118+ run : |
119+ python -m nuitka --standalone --jobs=$(nproc) \
120+ --output-filename=SexyUIEditor --output-dir=dist \
121+ --company-name=StackAndPointer --product-name=SexyUIEditor \
122+ --file-description="SexyUI & PVZ UI Editor" \
123+ --copyright="Copyright (C) 2026 StackAndPointer" \
124+ --file-version=1.2.0.0 --product-version=1.2.0.0 \
125+ --linux-icon=resources/icons/icon.png \
126+ --enable-plugin=pyqt6 \
127+ --include-package=core --include-package=ui \
128+ --include-data-dir=i18n=i18n \
129+ --include-data-dir=resources=resources \
130+ --include-data-dir=SexyUIExtensions=SexyUIExtensions \
131+ --nofollow-import-to=tkinter --nofollow-import-to=unittest \
132+ --nofollow-import-to=test --nofollow-import-to=tests \
133+ --nofollow-import-to=numpy --nofollow-import-to=pandas \
134+ --nofollow-import-to=scipy --nofollow-import-to=matplotlib \
135+ --nofollow-import-to=PIL --nofollow-import-to=cv2 \
136+ --nofollow-import-to=venv \
137+ --assume-yes-for-downloads --show-progress main.py
138+
139+ - name : Copy resource directories
140+ run : |
141+ if [ -d "Content" ]; then cp -r Content dist/main.dist/; fi
142+ if [ -d "pak" ]; then cp -r pak dist/main.dist/; fi
143+
144+ - name : Upload build artifact
145+ uses : actions/upload-artifact@v4
146+ with :
147+ name : SexyUIEditor-Linux
148+ path : dist/main.dist/
149+
150+ build-macos :
151+ name : macOS Build (Nuitka)
152+ runs-on : macos-latest
153+ needs : lint
154+ steps :
155+ - uses : actions/checkout@v4
156+ with :
157+ lfs : true
158+
159+ - name : Set up Python 3.11
160+ uses : actions/setup-python@v5
161+ with :
162+ python-version : " 3.11"
163+
164+ - name : Install Python dependencies
165+ run : |
166+ python -m pip install --upgrade pip
167+ pip install -r requirements.txt
168+ pip install nuitka
169+
170+ - name : Build with Nuitka
171+ run : |
172+ python -m nuitka --standalone --jobs=$(sysctl -n hw.ncpu) \
173+ --output-filename=SexyUIEditor --output-dir=dist \
174+ --company-name=StackAndPointer --product-name=SexyUIEditor \
175+ --file-description="SexyUI & PVZ UI Editor" \
176+ --copyright="Copyright (C) 2026 StackAndPointer" \
177+ --file-version=1.2.0.0 --product-version=1.2.0.0 \
178+ --macos-app-icon=resources/icons/icon.png \
179+ --enable-plugin=pyqt6 \
180+ --include-package=core --include-package=ui \
181+ --include-data-dir=i18n=i18n \
182+ --include-data-dir=resources=resources \
183+ --include-data-dir=SexyUIExtensions=SexyUIExtensions \
184+ --nofollow-import-to=tkinter --nofollow-import-to=unittest \
185+ --nofollow-import-to=test --nofollow-import-to=tests \
186+ --nofollow-import-to=numpy --nofollow-import-to=pandas \
187+ --nofollow-import-to=scipy --nofollow-import-to=matplotlib \
188+ --nofollow-import-to=PIL --nofollow-import-to=cv2 \
189+ --nofollow-import-to=venv \
190+ --assume-yes-for-downloads --show-progress main.py
191+
192+ - name : Copy resource directories
193+ run : |
194+ if [ -d "Content" ]; then cp -r Content dist/main.dist/; fi
195+ if [ -d "pak" ]; then cp -r pak dist/main.dist/; fi
196+
197+ - name : Upload build artifact
198+ uses : actions/upload-artifact@v4
199+ with :
200+ name : SexyUIEditor-macOS
201+ path : dist/main.dist/
202+
84203 release :
85204 name : Create Release on Tag
86205 if : startsWith(github.ref, 'refs/tags/v')
87- runs-on : windows -latest
88- needs : build
206+ runs-on : ubuntu -latest
207+ needs : [ build-windows, build-linux, build-macos]
89208 steps :
90209 - uses : actions/checkout@v4
91210
92- - name : Download build artifact
211+ - name : Download Windows artifact
93212 uses : actions/download-artifact@v4
94213 with :
95214 name : SexyUIEditor-Windows
96215 path : SexyUIEditor-Windows
97216
98- - name : Create ZIP archive
217+ - name : Download Linux artifact
218+ uses : actions/download-artifact@v4
219+ with :
220+ name : SexyUIEditor-Linux
221+ path : SexyUIEditor-Linux
222+
223+ - name : Download macOS artifact
224+ uses : actions/download-artifact@v4
225+ with :
226+ name : SexyUIEditor-macOS
227+ path : SexyUIEditor-macOS
228+
229+ - name : Create ZIP archives
99230 run : |
100- powershell Compress-Archive -Path SexyUIEditor-Windows\* -DestinationPath SexyUIEditor-${{ github.ref_name }}.zip
231+ cd SexyUIEditor-Windows && zip -r ../SexyUIEditor-${{ github.ref_name }}-Windows.zip . && cd ..
232+ cd SexyUIEditor-Linux && zip -r ../SexyUIEditor-${{ github.ref_name }}-Linux.zip . && cd ..
233+ cd SexyUIEditor-macOS && zip -r ../SexyUIEditor-${{ github.ref_name }}-macOS.zip . && cd ..
101234
102235 - name : Create GitHub Release
103236 uses : softprops/action-gh-release@v2
104237 with :
105- files : SexyUIEditor-${{ github.ref_name }}.zip
238+ files : |
239+ SexyUIEditor-${{ github.ref_name }}-Windows.zip
240+ SexyUIEditor-${{ github.ref_name }}-Linux.zip
241+ SexyUIEditor-${{ github.ref_name }}-macOS.zip
106242 body : |
107243 SexyUI Editor ${{ github.ref_name }}
108244
109- ### 使用说明
110- 1. 下载 ZIP 并解压
111- 2. 运行 SexyUIEditor.exe
112- 3. 如果需要使用 .NET 版本的资源预览,请手动将 `Content` 和 `pak` 文件夹复制到解压目录
245+ ### Downloads
246+ | Platform | File |
247+ |----------|------|
248+ | Windows | SexyUIEditor-${{ github.ref_name }}-Windows.zip |
249+ | Linux | SexyUIEditor-${{ github.ref_name }}-Linux.zip |
250+ | macOS | SexyUIEditor-${{ github.ref_name }}-macOS.zip |
251+
252+ ### Usage
253+ 1. Download the ZIP for your platform and extract
254+ 2. Windows: Run SexyUIEditor.exe
255+ 3. Linux/macOS: Run SexyUIEditor (may need `chmod +x SexyUIEditor`)
256+ 4. Resource files (Content and pak directories) are included in the package
113257 draft : false
114- prerelease : false
258+ prerelease : false
0 commit comments