Skip to content

Commit 8def8f3

Browse files
committed
fix desktop CI: use bunx tsc, macos-latest, --dir build
1 parent e70ab49 commit 8def8f3

1 file changed

Lines changed: 36 additions & 8 deletions

File tree

‎.github/workflows/publish-desktop.yml‎

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- os: macos-latest
2929
arch: arm64
3030
platform: mac
31-
- os: macos-13
31+
- os: macos-latest
3232
arch: x64
3333
platform: mac
3434
- os: ubuntu-latest
@@ -89,25 +89,53 @@ jobs:
8989
fi
9090
9191
- name: Build desktop app (TypeScript)
92-
run: npx tsc -p tsconfig.json
92+
run: bunx tsc -p tsconfig.json
9393
working-directory: apps/desktop
9494

9595
- name: Build desktop distributables
9696
env:
9797
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98-
run: npx electron-builder --${{ matrix.platform }} --${{ matrix.arch }} --publish never
98+
run: |
99+
npx electron-builder --${{ matrix.platform }} --${{ matrix.arch }} --dir
99100
working-directory: apps/desktop
100101

102+
- name: Package artifacts (macOS)
103+
if: matrix.platform == 'mac'
104+
working-directory: apps/desktop/dist
105+
run: |
106+
# Find the .app and zip it
107+
APP_DIR=$(find . -name "*.app" -maxdepth 2 | head -1)
108+
if [ -n "$APP_DIR" ]; then
109+
ZIP_NAME="Executor-${{ matrix.arch }}-mac.zip"
110+
ditto -c -k --sequesterRsrc --keepParent "$APP_DIR" "$ZIP_NAME"
111+
fi
112+
113+
- name: Package artifacts (Linux)
114+
if: matrix.platform == 'linux'
115+
working-directory: apps/desktop/dist
116+
run: |
117+
UNPACKED=$(find . -name "unpacked" -type d -maxdepth 2 | head -1)
118+
if [ -n "$UNPACKED" ]; then
119+
tar -czf "Executor-x64-linux.tar.gz" -C "$UNPACKED" .
120+
fi
121+
122+
- name: Package artifacts (Windows)
123+
if: matrix.platform == 'win'
124+
working-directory: apps/desktop/dist
125+
shell: pwsh
126+
run: |
127+
$unpacked = Get-ChildItem -Path . -Filter "win-unpacked" -Directory -Recurse | Select-Object -First 1
128+
if ($unpacked) {
129+
Compress-Archive -Path "$($unpacked.FullName)\*" -DestinationPath "Executor-x64-win.zip"
130+
}
131+
101132
- name: Upload artifacts
102133
uses: actions/upload-artifact@v4
103134
with:
104135
name: desktop-${{ matrix.platform }}-${{ matrix.arch }}
105136
path: |
106-
apps/desktop/dist/*.dmg
107137
apps/desktop/dist/*.zip
108-
apps/desktop/dist/*.exe
109-
apps/desktop/dist/*.AppImage
110-
apps/desktop/dist/*.deb
138+
apps/desktop/dist/*.tar.gz
111139
if-no-files-found: warn
112140

113141
release:
@@ -140,7 +168,7 @@ jobs:
140168
done
141169
142170
# Upload desktop artifacts
143-
find artifacts -type f \( -name "*.dmg" -o -name "*.zip" -o -name "*.exe" -o -name "*.AppImage" -o -name "*.deb" \) | while read file; do
171+
find artifacts -type f \( -name "*.zip" -o -name "*.tar.gz" \) | while read file; do
144172
echo "Uploading: $file"
145173
gh release upload "$TAG" "$file" --repo "$GITHUB_REPOSITORY" --clobber || true
146174
done

0 commit comments

Comments
 (0)