@@ -134,37 +134,176 @@ jobs:
134134 name : PictoPy-MacOS
135135 path : backend/dist/PictoPy_Server/PictoPy-MacOS.zip
136136
137+ build-sync-microservice-windows :
138+ runs-on : windows-latest
139+ steps :
140+ - name : Checkout code
141+ uses : actions/checkout@v4
142+
143+ - name : Setup Python
144+ uses : actions/setup-python@v4
145+ with :
146+ python-version : 3.12
147+
148+ - name : Install dependencies
149+ run : |
150+ cd sync-microservice
151+ python -m pip install --upgrade pip
152+ pip install -r requirements.txt
153+ pip install pyinstaller
154+
155+ - name : Build executable with PyInstaller
156+ run : |
157+ cd sync-microservice
158+ pyinstaller main.py --name PictoPy_Sync --onedir --distpath dist
159+
160+ - name : Copy app folder
161+ run : |
162+ cd sync-microservice
163+ robocopy app dist\PictoPy_Sync\app /e
164+ if ($LASTEXITCODE -le 1) { exit 0 }
165+
166+ - name : Create ZIP package
167+ run : |
168+ cd sync-microservice/dist/PictoPy_Sync
169+ tar -a -c -f PictoPy-Sync-Windows.zip .
170+
171+ - name : Upload artifact
172+ uses : actions/upload-artifact@v4
173+ with :
174+ name : PictoPy-Sync-Windows
175+ path : sync-microservice/dist/PictoPy_Sync/PictoPy-Sync-Windows.zip
176+
177+ build-sync-microservice-ubuntu :
178+ runs-on : ubuntu-22.04
179+ steps :
180+ - name : Checkout code
181+ uses : actions/checkout@v4
182+
183+ - name : Setup Python
184+ uses : actions/setup-python@v4
185+ with :
186+ python-version : 3.12
187+
188+ - name : Install dependencies
189+ run : |
190+ cd sync-microservice
191+ python -m pip install --upgrade pip
192+ pip install -r requirements.txt
193+ pip install pyinstaller
194+
195+ - name : Build executable with PyInstaller
196+ run : |
197+ cd sync-microservice
198+ pyinstaller main.py --name PictoPy_Sync --onedir --distpath dist
199+
200+ - name : Copy app folder
201+ run : |
202+ cd sync-microservice
203+ mkdir -p dist/PictoPy_Sync/app
204+ cp -r app/* dist/PictoPy_Sync/app/
205+
206+ - name : Create ZIP package
207+ run : |
208+ cd sync-microservice/dist/PictoPy_Sync
209+ zip -r PictoPy-Sync-Ubuntu.zip .
210+
211+ - name : Upload artifact
212+ uses : actions/upload-artifact@v4
213+ with :
214+ name : PictoPy-Sync-Ubuntu
215+ path : sync-microservice/dist/PictoPy_Sync/PictoPy-Sync-Ubuntu.zip
216+
217+ build-sync-microservice-macos :
218+ runs-on : macos-latest
219+ steps :
220+ - name : Checkout code
221+ uses : actions/checkout@v4
222+
223+ - name : Setup Python
224+ uses : actions/setup-python@v4
225+ with :
226+ python-version : 3.12
227+
228+ - name : Install dependencies
229+ run : |
230+ cd sync-microservice
231+ python -m pip install --upgrade pip
232+ pip install -r requirements.txt
233+ pip install pyinstaller
234+
235+ - name : Build executable with PyInstaller
236+ run : |
237+ cd sync-microservice
238+ pyinstaller main.py --name PictoPy_Sync --onedir --distpath dist
239+
240+ - name : Copy app folder
241+ run : |
242+ cd sync-microservice
243+ mkdir -p dist/PictoPy_Sync/app
244+ cp -r app/* dist/PictoPy_Sync/app/
245+
246+ - name : Create ZIP package
247+ run : |
248+ cd sync-microservice/dist/PictoPy_Sync
249+ zip -r PictoPy-Sync-MacOS.zip .
250+
251+ - name : Upload artifact
252+ uses : actions/upload-artifact@v4
253+ with :
254+ name : PictoPy-Sync-MacOS
255+ path : sync-microservice/dist/PictoPy_Sync/PictoPy-Sync-MacOS.zip
256+
137257 publish-tauri :
138258 permissions :
139259 contents : write
140- needs : [build-server-windows, build-server-ubuntu, build-server-macos]
260+ needs :
261+ [
262+ build-server-windows,
263+ build-server-ubuntu,
264+ build-server-macos,
265+ build-sync-microservice-windows,
266+ build-sync-microservice-ubuntu,
267+ build-sync-microservice-macos,
268+ ]
141269 strategy :
142270 fail-fast : false
143271 matrix :
144272 include :
145273 - platform : " macos-latest"
146274 args : " --target aarch64-apple-darwin"
147- artifact : " PictoPy-MacOS"
275+ server-artifact : " PictoPy-MacOS"
276+ sync-artifact : " PictoPy-Sync-MacOS"
148277 - platform : " ubuntu-22.04"
149278 args : " "
150- artifact : " PictoPy-Ubuntu"
279+ server-artifact : " PictoPy-Ubuntu"
280+ sync-artifact : " PictoPy-Sync-Ubuntu"
151281 - platform : " windows-latest"
152282 args : " "
153- artifact : " PictoPy-Windows"
283+ server-artifact : " PictoPy-Windows"
284+ sync-artifact : " PictoPy-Sync-Windows"
154285 runs-on : ${{ matrix.platform }}
155286 steps :
156287 - uses : actions/checkout@v4
157288
158- - name : Create dist directory
289+ - name : Create dist directories
159290 shell : bash
160- run : mkdir -p backend/dist
291+ run : |
292+ mkdir -p backend/dist
293+ mkdir -p sync-microservice/dist
161294
162295 - name : Download and extract server artifact
163296 uses : actions/download-artifact@v4
164297 with :
165- name : ${{ matrix.artifact }}
298+ name : ${{ matrix.server- artifact }}
166299 path : backend/dist
167300
301+ - name : Download and extract sync microservice artifact
302+ uses : actions/download-artifact@v4
303+ with :
304+ name : ${{ matrix.sync-artifact }}
305+ path : sync-microservice/dist
306+
168307 - name : Extract server files
169308 shell : bash
170309 run : |
@@ -173,6 +312,14 @@ jobs:
173312 rm *.zip
174313 ls -l
175314
315+ - name : Extract sync microservice files
316+ shell : bash
317+ run : |
318+ cd sync-microservice/dist
319+ unzip -o *.zip
320+ rm *.zip
321+ ls -l
322+
176323 - name : Setup Node
177324 uses : actions/setup-node@v4
178325 with :
0 commit comments