Skip to content

Commit c241992

Browse files
timiclaude
authored andcommitted
fix: disable auto-notarization and manually sign all binaries
- Add APPLE_NOTARIZE: false to disable Tauri's auto-notarization - Deep sign all .node, .dylib, and executable files recursively - Sign specific problematic binaries (node, ripgrep) in nested directories - Re-sign entire app bundle with Developer ID certificate - Rebuild DMG after signing to include signed binaries - Manually notarize the DMG using xcrun notarytool This fixes the notarization failure caused by unsigned binaries in the app bundle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0c4e30c commit c241992

1 file changed

Lines changed: 63 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 63 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
# List keychains to ensure system can access certificates
132132
security list-keychain -d user -s $KEYCHAIN_PATH
133133
134-
- name: Build Tauri app (Apple Silicon)
134+
- name: Build Tauri app (Apple Silicon) without notarization
135135
working-directory: ./lumis/apps/web
136136
run: pnpm tauri:build
137137
env:
@@ -141,12 +141,71 @@ jobs:
141141
APPLE_ID: "${{ secrets.APPLE_ID }}"
142142
APPLE_PASSWORD: "${{ secrets.APPLE_PASSWORD }}"
143143
APPLE_TEAM_ID: "${{ secrets.APPLE_TEAM_ID }}"
144+
APPLE_NOTARIZE: false
144145

145-
- name: Sign native modules in bundle
146+
- name: Deep sign all binaries in bundle
146147
working-directory: ./lumis/apps/web/src-tauri/target/release/bundle/macos/Lumis.app
147148
run: |
148-
# Sign all executable files, .node files, and dylib to fix notarization issues
149-
find . -type f \( -name "*.node" -o -name "*.dylib" -o -perm +111 \) -exec codesign --force --sign "${{ secrets.APPLE_SIGNING_IDENTITY }}" --options runtime {} \;
149+
# Sign all executable files, .node files, and dylib recursively
150+
echo "Signing all .node files..."
151+
find . -type f -name "*.node" -print0 | xargs -0 codesign --force --sign "${{ secrets.APPLE_SIGNING_IDENTITY }}" --options runtime --timestamp || true
152+
153+
echo "Signing all .dylib files..."
154+
find . -type f -name "*.dylib" -print0 | xargs -0 codesign --force --sign "${{ secrets.APPLE_SIGNING_IDENTITY }}" --options runtime --timestamp || true
155+
156+
echo "Signing all executable files..."
157+
find . -type f -perm +111 -print0 | xargs -0 codesign --force --sign "${{ secrets.APPLE_SIGNING_IDENTITY }}" --options runtime --timestamp || true
158+
159+
- name: Sign specific problematic binaries
160+
working-directory: ./lumis/apps/web/src-tauri/target/release/bundle/macos/Lumis.app
161+
run: |
162+
# Sign all known problematic binaries in nested directories
163+
BINARY_PATHS=(
164+
"./Contents/Resources/_up_/cli-bundle/node"
165+
"./Contents/Resources/_up_/cli-bundle/vendor/ripgrep/arm64-darwin/rg"
166+
"./Contents/Resources/_up_/cli-bundle/vendor/ripgrep/arm64-darwin/ripgrep.node"
167+
"./Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/node"
168+
"./Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/vendor/ripgrep/arm64-darwin/rg"
169+
"./Contents/Resources/_up_/.next/standalone/apps/web/cli-bundle/vendor/ripgrep/arm64-darwin/ripgrep.node"
170+
)
171+
172+
for BINARY in "${BINARY_PATHS[@]}"; do
173+
if [ -f "$BINARY" ]; then
174+
echo "Signing: $BINARY"
175+
xattr -cr "$BINARY" 2>/dev/null || true
176+
codesign --force --sign "${{ secrets.APPLE_SIGNING_IDENTITY }}" --options runtime --timestamp "$BINARY"
177+
else
178+
echo "File not found: $BINARY"
179+
fi
180+
done
181+
182+
- name: Re-sign entire app bundle
183+
working-directory: ./lumis/apps/web/src-tauri/target/release/bundle/macos/Lumis.app
184+
run: |
185+
# Finally re-sign the entire app bundle
186+
echo "Re-signing entire app bundle..."
187+
xattr -cr . 2>/dev/null || true
188+
codesign --force --sign "${{ secrets.APPLE_SIGNING_IDENTITY }}" --options runtime --timestamp .
189+
190+
- name: Rebuild DMG after signing
191+
working-directory: ./lumis/apps/web/src-tauri/target/release/bundle/macos
192+
run: |
193+
# Remove old DMG and rebuild with signed app
194+
rm -f dmg/*.dmg
195+
# Get app version from package.json
196+
VERSION=$(cat ../../../../../package.json | jq -r '.version')
197+
# Create new DMG with signed app
198+
hdiutil create -volname "Lumis" -srcfolder "Lumis.app" -ov -format UDZO "dmg/Lumis_${VERSION}_aarch64.dmg"
199+
200+
- name: Notarize DMG
201+
run: |
202+
DMG_PATH=$(ls ./lumis/apps/web/src-tauri/target/release/bundle/dmg/Lumis*.dmg)
203+
echo "Notarizing: $DMG_PATH"
204+
xcrun notarytool submit "$DMG_PATH" \
205+
--apple-id "${{ secrets.APPLE_ID }}" \
206+
--password "${{ secrets.APPLE_PASSWORD }}" \
207+
--team-id "${{ secrets.APPLE_TEAM_ID }}" \
208+
--wait
150209
151210
- name: Find DMG file
152211
id: dmg

0 commit comments

Comments
 (0)