Skip to content

πŸ™Œ OpenHands: AI-Driven Development

ci(desktop-macos): surface the unquarantine workaround on the release (#18723)

Vasco Schiavoe70151c1afb8
diff --git a/.github/macos-install-note.md b/.github/macos-install-note.md
new file mode 100644
index 0000000000..78aa6b8568
--- /dev/null
+++ b/.github/macos-install-note.md
@@ -0,0 +1,12 @@
+<!-- macos-install-note -->
+### macOS install note
+
+The app isn't signed with an Apple Developer ID yet, so macOS may call a
+downloaded build *"damaged"* β€” it's Gatekeeper quarantine, not a bad file.
+After moving the app to Applications, clear the flag once, then open normally:
+
+```sh
+xattr -dr com.apple.quarantine "/Applications/OpenHands Agent Canvas.app"
+```
+
+Signing + notarization is tracked in OpenHands/OpenHands#16774.
diff --git a/.github/workflows/desktop-macos.yml b/.github/workflows/desktop-macos.yml
index 54bc395c86..93ac530127 100644
--- a/.github/workflows/desktop-macos.yml
+++ b/.github/workflows/desktop-macos.yml
@@ -199,3 +199,25 @@ jobs:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$RELEASE_TAG" dist-electron/*.dmg --clobber
+
+ - name: Add macOS install note to release
+ # The DMG is only ad-hoc signed, so macOS flags a downloaded app as
+ # "damaged" until signing + notarization lands (#16774). Until then,
+ # append the unquarantine fix (.github/macos-install-note.md) to the
+ # release. Best-effort and idempotent (marker-guarded).
+ if: github.event_name == 'release'
+ continue-on-error: true
+ env:
+ GH_TOKEN: ${{ github.token }}
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
+ run: |
+ note_file=.github/macos-install-note.md
+ marker=$(head -n 1 "$note_file")
+ body=$(gh release view "$RELEASE_TAG" --json body --jq .body)
+ if printf '%s' "$body" | grep -qF "$marker"; then
+ echo "macOS install note already present; skipping."
+ exit 0
+ fi
+ printf '%s\n\n%s\n' "$body" "$(cat "$note_file")" \
+ | gh release edit "$RELEASE_TAG" --notes-file -
+ echo "Appended macOS install note to $RELEASE_TAG."