@@ -46,34 +46,45 @@ jobs:
4646 key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
4747
4848 - name : Install dependencies
49+ working-directory : ${{ steps.wd.outputs.dir }}
4950 run : |
50- cd "$wd"
5151 python -m pip install --upgrade pip
5252 pip uninstall -y wheel || true
5353 pip install -r requirements.txt
5454 pip install py2app
5555
5656 - name : Ensure icon exists (fallback if missing)
5757 shell : bash
58+ working-directory : ${{ steps.wd.outputs.dir }}
5859 run : |
5960 set -euo pipefail
60- cd "$wd"
6161 ICON=assets/icon.png
6262 if [[ ! -f "$ICON" ]]; then
63- echo "[warn] $ICON not found. Generating a tiny placeholder icon..."
64- python -c "import base64, pathlib; pathlib.Path('assets').mkdir(parents=True, exist_ok=True); open('assets/icon.png','wb').write(base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMB/ai4E4QAAAAASUVORK5CYII='))"
63+ echo "[warn] $ICON not found. Will probe common locations and fallback to placeholder."
64+ for CAND in icon.png Icon.png ICON.png images/icon.png assets/Icon.png; do
65+ if [[ -f "$CAND" ]]; then
66+ mkdir -p assets
67+ cp "$CAND" "$ICON"
68+ echo "[ok] Copied $CAND -> $ICON"
69+ break
70+ fi
71+ done
72+ fi
73+ if [[ ! -f "$ICON" ]]; then
74+ python -c "import base64, pathlib; pathlib.Path('assets').mkdir(parents=True, exist_ok=True); open('assets/icon.png','wb').write(base64.b64decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMB/ai4E4QAAAAASUVORK5CYII='))";
75+ echo "[ok] Generated placeholder icon at $ICON"
6576 else
6677 echo "[ok] Found $ICON"
6778 fi
6879
6980 - name : Build .app
81+ working-directory : ${{ steps.wd.outputs.dir }}
7082 run : |
71- cd "$wd"
7283 python setup.py py2app -q
7384
7485 - name : Archive app (zip)
86+ working-directory : ${{ steps.wd.outputs.dir }}/dist
7587 run : |
76- cd "$wd/dist"
7788 ditto -c -k --sequesterRsrc --keepParent PackyCode.app PackyCode-macOS.zip
7889
7990 - name : Upload artifact
0 commit comments