|
28 | 28 | - os: macos-latest |
29 | 29 | arch: arm64 |
30 | 30 | platform: mac |
31 | | - - os: macos-13 |
| 31 | + - os: macos-latest |
32 | 32 | arch: x64 |
33 | 33 | platform: mac |
34 | 34 | - os: ubuntu-latest |
@@ -89,25 +89,53 @@ jobs: |
89 | 89 | fi |
90 | 90 |
|
91 | 91 | - name: Build desktop app (TypeScript) |
92 | | - run: npx tsc -p tsconfig.json |
| 92 | + run: bunx tsc -p tsconfig.json |
93 | 93 | working-directory: apps/desktop |
94 | 94 |
|
95 | 95 | - name: Build desktop distributables |
96 | 96 | env: |
97 | 97 | 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 |
99 | 100 | working-directory: apps/desktop |
100 | 101 |
|
| 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 | +
|
101 | 132 | - name: Upload artifacts |
102 | 133 | uses: actions/upload-artifact@v4 |
103 | 134 | with: |
104 | 135 | name: desktop-${{ matrix.platform }}-${{ matrix.arch }} |
105 | 136 | path: | |
106 | | - apps/desktop/dist/*.dmg |
107 | 137 | 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 |
111 | 139 | if-no-files-found: warn |
112 | 140 |
|
113 | 141 | release: |
@@ -140,7 +168,7 @@ jobs: |
140 | 168 | done |
141 | 169 |
|
142 | 170 | # 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 |
144 | 172 | echo "Uploading: $file" |
145 | 173 | gh release upload "$TAG" "$file" --repo "$GITHUB_REPOSITORY" --clobber || true |
146 | 174 | done |
0 commit comments