Skip to content

Commit ac23d19

Browse files
committed
fix workflow
1 parent b2d0d9b commit ac23d19

2 files changed

Lines changed: 62 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,83 @@ jobs:
4343
- name: Build application
4444
run: npm run build
4545

46+
- name: Sign native binaries
47+
if: env.APPLE_CERTIFICATE != ''
48+
env:
49+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
50+
run: |
51+
# Find the signing identity
52+
IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep "Developer ID Application" | head -1 | awk -F'"' '{print $2}')
53+
echo "Using identity: $IDENTITY"
54+
55+
# Sign the native mouse-telemetry binary with hardened runtime
56+
if [ -f "native/mouse-telemetry" ]; then
57+
codesign --force --options runtime --timestamp --sign "$IDENTITY" native/mouse-telemetry
58+
echo "Signed native/mouse-telemetry"
59+
codesign -vv native/mouse-telemetry
60+
fi
61+
4662
- name: Package application
4763
env:
4864
APPLE_ID: ${{ secrets.APPLE_ID }}
4965
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
5066
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
67+
CSC_KEYCHAIN: build.keychain
5168
run: npm run package:mac -- --publish never
5269

70+
- name: Verify code signatures
71+
run: |
72+
echo "=== Verifying app bundle signature ==="
73+
APP_PATH=$(find release -name "*.app" -type d | head -1)
74+
echo "App path: $APP_PATH"
75+
76+
# Verify the main app signature
77+
codesign -vv --deep "$APP_PATH" || echo "Deep verification failed"
78+
79+
# List all Mach-O binaries and their signing status
80+
echo "=== Checking all binaries ==="
81+
find "$APP_PATH" -type f \( -perm +111 -o -name "*.dylib" -o -name "*.so" -o -name "*.node" \) 2>/dev/null | while read binary; do
82+
echo "Checking: $binary"
83+
codesign -vv "$binary" 2>&1 || echo " UNSIGNED or INVALID"
84+
done
85+
86+
# Show the main executable info
87+
echo "=== Main executable info ==="
88+
codesign -dvv "$APP_PATH"
89+
5390
- name: Notarize application
5491
if: env.APPLE_ID != '' && env.APPLE_APP_SPECIFIC_PASSWORD != ''
5592
env:
5693
APPLE_ID: ${{ secrets.APPLE_ID }}
5794
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
5895
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
5996
run: |
60-
xcrun notarytool submit release/*.zip \
97+
# Submit for notarization and capture output
98+
SUBMIT_OUTPUT=$(xcrun notarytool submit release/*.zip \
6199
--apple-id "$APPLE_ID" \
62100
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
63101
--team-id "$APPLE_TEAM_ID" \
64-
--wait
102+
--wait 2>&1) || true
103+
104+
echo "$SUBMIT_OUTPUT"
105+
106+
# Extract submission ID
107+
SUBMISSION_ID=$(echo "$SUBMIT_OUTPUT" | grep -m1 "id:" | awk '{print $2}')
108+
echo "Submission ID: $SUBMISSION_ID"
109+
110+
# Check if notarization was successful
111+
if echo "$SUBMIT_OUTPUT" | grep -q "status: Accepted"; then
112+
echo "Notarization successful!"
113+
else
114+
echo "Notarization failed. Fetching detailed log..."
115+
xcrun notarytool log "$SUBMISSION_ID" \
116+
--apple-id "$APPLE_ID" \
117+
--password "$APPLE_APP_SPECIFIC_PASSWORD" \
118+
--team-id "$APPLE_TEAM_ID" \
119+
notarization-log.json
120+
cat notarization-log.json
121+
exit 1
122+
fi
65123
66124
- name: Staple notarization
67125
if: env.APPLE_ID != '' && env.APPLE_APP_SPECIFIC_PASSWORD != ''

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
"zip"
5454
],
5555
"hardenedRuntime": true,
56-
"gatekeeperAssess": true,
57-
"identity": null,
56+
"gatekeeperAssess": false,
5857
"entitlements": "build/entitlements.mac.plist",
5958
"entitlementsInherit": "build/entitlements.mac.plist",
59+
"signIgnore": [],
6060
"extendInfo": {
6161
"NSMicrophoneUsageDescription": "This app needs microphone access for screen recording with audio.",
6262
"NSHighResolutionCapable": true

0 commit comments

Comments
 (0)