@@ -334,9 +334,9 @@ jobs: |
334 | 334 | VITE_SENTRY_ENVIRONMENT: ${{ (github.ref_name == 'beta' && 'beta') || 'production' }} |
335 | 335 | VITE_SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }} |
336 | 336 |
|
337 | | - - name: Package and publish |
| 337 | + - name: Package |
338 | 338 | if: needs.version.outputs.release |
339 | | - run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish always --config electron-builder.config.ts |
| 339 | + run: npx electron-builder ${{ matrix.settings.platform_flag }} --publish never --config electron-builder.config.ts |
340 | 340 | working-directory: packages/desktop |
341 | 341 | timeout-minutes: 60 |
342 | 342 | env: |
@@ -356,11 +356,9 @@ jobs: |
356 | 356 | env: |
357 | 357 | OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }} |
358 | 358 |
|
359 | | - - name: Create and upload macOS .app.tar.gz |
| 359 | + - name: Create macOS .app.tar.gz |
360 | 360 | if: runner.os == 'macOS' && needs.version.outputs.release |
361 | 361 | working-directory: packages/desktop/dist |
362 | | - env: |
363 | | - GH_TOKEN: ${{ steps.committer.outputs.token }} |
364 | 362 | run: | |
365 | 363 | if [[ "${{ matrix.settings.target }}" == "x86_64-apple-darwin" ]]; then |
366 | 364 | APP_DIR="mac" |
@@ -378,7 +376,6 @@ jobs: |
378 | 376 | exit 1 |
379 | 377 | fi |
380 | 378 | tar -czf "$OUT_NAME" -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")" |
381 | | - gh release upload "v${{ needs.version.outputs.version }}" "$OUT_NAME" --clobber --repo "${{ needs.version.outputs.repo }}" |
382 | 379 |
|
383 | 380 | - name: Verify signed Windows Electron artifacts |
384 | 381 | if: runner.os == 'Windows' |
@@ -464,6 +461,13 @@ jobs: |
464 | 461 | pattern: latest-yml-* |
465 | 462 | path: /tmp/latest-yml |
466 | 463 |
|
| 464 | + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 |
| 465 | + if: needs.version.outputs.release |
| 466 | + with: |
| 467 | + pattern: opencode-desktop-* |
| 468 | + path: /tmp/desktop |
| 469 | + merge-multiple: true |
| 470 | + |
467 | 471 | - name: Setup git committer |
468 | 472 | id: committer |
469 | 473 | uses: ./.github/actions/setup-git-committer |
@@ -490,6 +494,19 @@ jobs: |
490 | 494 | git config --global user.name "opencode" |
491 | 495 | ssh-keyscan -H aur.archlinux.org >> ~/.ssh/known_hosts || true |
492 | 496 |
|
| 497 | + - name: Upload desktop release assets |
| 498 | + if: needs.version.outputs.release |
| 499 | + env: |
| 500 | + GH_TOKEN: ${{ steps.committer.outputs.token }} |
| 501 | + run: | |
| 502 | + shopt -s nullglob |
| 503 | + files=(/tmp/desktop/*.{exe,blockmap,dmg,zip,AppImage,deb,rpm} /tmp/desktop/*.app.tar.gz) |
| 504 | + if (( ${#files[@]} == 0 )); then |
| 505 | + echo "No desktop release assets found" |
| 506 | + exit 1 |
| 507 | + fi |
| 508 | + gh release upload "v${{ needs.version.outputs.version }}" "${files[@]}" --clobber --repo "${{ needs.version.outputs.repo }}" |
| 509 | +
|
493 | 510 | - run: ./script/publish.ts |
494 | 511 | env: |
495 | 512 | OPENCODE_VERSION: ${{ needs.version.outputs.version }} |
|