@@ -35,33 +35,60 @@ jobs:
35
35
run : npm run react-build
36
36
37
37
# ---------------------------------
38
- # macOS Build & Notarization (API Key )
38
+ # macOS Build (Sign only, no auto-notarize )
39
39
# ---------------------------------
40
40
- name : Print environment for debugging
41
41
if : matrix.os == 'macos-latest'
42
42
run : printenv | sort
43
- - name : Build Electron app (macOS)
43
+
44
+ - name : Build & Sign Electron app (macOS)
44
45
if : matrix.os == 'macos-latest'
45
46
env :
46
- # Use Apple API key for notarization:
47
- APPLE_API_KEY : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }}
48
- APPLE_API_KEY_ID : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY_ID }}
49
- APPLE_API_ISSUER : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_UUID }}
50
-
51
- # Developer ID certificate & password for code signing:
47
+ # Provide ONLY the .p12 certificate for code signing.
52
48
CSC_LINK : ${{ secrets.MACOS_CERTIFICATE }}
53
49
CSC_KEY_PASSWORD : ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
54
50
55
- # If your package.json notarize block references teamId:
56
- APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
57
-
58
- # Debug logging for electron-builder
51
+ # Remove or omit the Apple API key vars from electron-builder,
52
+ # so it doesn't attempt notarization internally.
59
53
DEBUG : electron-builder
60
-
61
- # GitHub token (only if needed for publishing)
62
54
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55
+ run : |
56
+ # Remove any "notarize" block from package.json or set "notarize": false
57
+ # to ensure electron-builder won't attempt notarization automatically.
58
+ npm run electron-build
63
59
64
- run : npm run electron-build
60
+ - name : Submit app for notarization
61
+ if : matrix.os == 'macos-latest'
62
+ run : |
63
+ # We'll assume your DMG name matches something like:
64
+ # dist/Drivechain-Launcher-<version>-x64.dmg
65
+ # If you produce multiple DMGs (x64, arm64), pick the correct one or do both.
66
+ DMG_FILE=$(ls dist/*-x64.dmg | head -n 1)
67
+ if [ -z "$DMG_FILE" ]; then
68
+ echo "No x64 DMG found to notarize!"
69
+ exit 1
70
+ fi
71
+ echo "Submitting $DMG_FILE for notarization..."
72
+
73
+ xcrun notarytool submit "$DMG_FILE" \
74
+ --key ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }} \
75
+ --key-id ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY_ID }} \
76
+ --issuer ${{ secrets.GODOT_MACOS_NOTARIZATION_API_UUID }} \
77
+ --output notarize_output.json --wait --timeout 20m
78
+
79
+ # This command automatically does the upload and waits up to 20 minutes.
80
+ # If you prefer a two-step process, omit "--wait" here and do a separate "wait" step.
81
+
82
+ - name : Staple notarization
83
+ if : matrix.os == 'macos-latest'
84
+ run : |
85
+ DMG_FILE=$(ls dist/*-x64.dmg | head -n 1)
86
+ if [ -z "$DMG_FILE" ]; then
87
+ echo "No x64 DMG found to staple!"
88
+ exit 1
89
+ fi
90
+ echo "Stapling $DMG_FILE..."
91
+ xcrun stapler staple "$DMG_FILE"
65
92
66
93
# ---------------------------------
67
94
# Windows Build
89
116
ls -la dist/
90
117
91
118
# ---------------------------------
92
- # Upload Artifacts (Same as before)
119
+ # Upload Artifacts
93
120
# ---------------------------------
94
121
- name : Check Linux build output
95
122
if : matrix.os == 'ubuntu-latest-large'
@@ -126,7 +153,7 @@ jobs:
126
153
if-no-files-found : error
127
154
128
155
# -------------------------------------
129
- # (Optional) Separate upload-to-releases job
156
+ # Separate upload-to-releases job
130
157
# -------------------------------------
131
158
upload-to-releases :
132
159
name : Upload to releases.drivechain.info
0 commit comments