A bunch of wip stuff

Piotr Osiewicz created

Change summary

.github/workflows/ci.yml |  9 ++++-----
script/notarize-mac      | 13 +++++++++++--
2 files changed, 15 insertions(+), 7 deletions(-)

Detailed changes

.github/workflows/ci.yml 🔗

@@ -511,7 +511,7 @@ jobs:
           fi
           exit $RET_CODE
 
-  release-build-mac:
+  build-release-mac:
     timeout-minutes: 120
     name: Build optimized macOS artifacts
     runs-on:
@@ -562,12 +562,11 @@ jobs:
       - name: Rename binaries
         if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
         run: |
-          mv target/aarch64-apple-darwin/release/Zed.dmg target/aarch64-apple-darwin/release/Zed-aarch64.dmg
-          mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
+          mv target/aarch64-apple-darwin/release/Zed.dmg target/aarch64-apple-darwin/release/Zed-aarch64.app
+          mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.app
 
       - name: Upload app bundle (aarch64) to workflow run if main branch or specific label
         uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
-        if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
         with:
           name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
           path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
@@ -587,7 +586,7 @@ jobs:
     if: |
       ( startsWith(github.ref, 'refs/tags/v')
       || contains(github.event.pull_request.labels.*.name, 'run-bundling') )
-    needs: [release-build-mac]
+    needs: [build-release-mac]
     strategy:
       matrix:
         target: [aarch64-apple-darwin, x86_64-apple-darwin]

script/notarize-mac 🔗

@@ -248,8 +248,17 @@ function sign_binary() {
 }
 
 sign_app_binaries  "$app_path" "$app_target"
-sign_binary "target/x86_64-apple-darwin/release/remote_server"
+sign_binary "$remote_server_path"
 
 if [ "$local_arch" = false ]; then
-    gzip -f --stdout --best target/x86_64-apple-darwin/release/remote_server > target/zed-remote-server-macos-x86_64.gz
+    remote_server_name=""
+    if [ "$app_target" = "aarch64-apple-darwin" ]; then
+        remote_server_name="zed-remote-server-macos-aarch64.gz"
+    elif [ "$app_target" = "x86_64-apple-darwin" ]; then
+        remote_server_name="zed-remote-server-macos-x86_64.gz"
+    else
+        echo "Unknown remote server binary target '$app_target'"
+        exit 1
+    fi
+    gzip -f --stdout --best $remote_server_path > "$remote_server_name"
 fi