Skip to content

fix(ci): ad-hoc sign DMG for macOS Tahoe compatibility #10

fix(ci): ad-hoc sign DMG for macOS Tahoe compatibility

fix(ci): ad-hoc sign DMG for macOS Tahoe compatibility #10

Workflow file for this run

name: Release Desktop App
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build-mac:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Build worker stub (C)
run: |
cat > /tmp/worker_stub.c << 'EOF'
#include <stdio.h>
int main(int argc, char *argv[]) {
printf("{\"type\":\"error\",\"message\":\"Scan non disponibile in questa build. Richiede worker Python locale.\"}\n");
return 1;
}
EOF
clang -arch arm64 -o src-tauri/binaries/morpheus-worker-aarch64-apple-darwin /tmp/worker_stub.c
chmod +x src-tauri/binaries/morpheus-worker-aarch64-apple-darwin
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build React frontend
run: |
cd frontend
npm ci
npm run build
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust deps
uses: Swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Build Tauri app
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
with:
tagName: ${{ github.ref_name }}
releaseName: "Morpheus ${{ github.ref_name }}"
releaseBody: |
## Morpheus Desktop ${{ github.ref_name }}
App desktop nativa macOS per lead generation iperlocale.
### Cosa funziona in questa build
- Visualizzazione e gestione lead su mappa
- Filtri, hotlist, cambio stato, export CSV
- Import database esistente (Impostazioni → Database)
- Geocodifica indirizzi
- Aggiunta manuale lead
### Nota
Le funzionalità di scansione (OSM/Google/Foursquare), verifica siti e arricchimento Facebook richiedono il worker Python locale. Vedi README per istruzioni.
### Installazione (Apple Silicon — M1/M2/M3/M4)
1. Scarica `Morpheus_${{ github.ref_name }}_aarch64.dmg`
2. Apri il DMG e trascina Morpheus in Applicazioni
3. Se macOS dice **"danneggiata"**, apri Terminal e incolla:
```
xattr -cr /Applications/Morpheus.app
codesign --force --deep --sign - /Applications/Morpheus.app
```
Poi riapri normalmente. Necessari entrambi i comandi su macOS Tahoe (16.x).
releaseDraft: false
prerelease: false
- name: Ad-hoc sign app and repackage DMG
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
APP="src-tauri/target/release/bundle/macos/Morpheus.app"
DMG=$(ls src-tauri/target/release/bundle/dmg/*.dmg | head -1)
# Ad-hoc sign the .app bundle
codesign --force --deep --sign - "$APP"
# Replace .app in DMG with signed version and repack
hdiutil convert "$DMG" -format UDRW -o /tmp/rw.dmg
hdiutil attach /tmp/rw.dmg -mountpoint /tmp/morphvol -nobrowse -quiet
rm -rf "/tmp/morphvol/Morpheus.app"
cp -r "$APP" "/tmp/morphvol/Morpheus.app"
hdiutil detach /tmp/morphvol -quiet
rm "$DMG"
hdiutil convert /tmp/rw.dmg -format UDZO -o "$DMG"
rm /tmp/rw.dmg
# Re-upload signed DMG to release (overwrites unsigned)
gh release upload "${{ github.ref_name }}" "$DMG" --clobber