12
12
jobs :
13
13
build :
14
14
runs-on : ${{ matrix.os }}
15
-
16
15
strategy :
17
16
matrix :
18
17
os : [ubuntu-latest-large, windows-latest, macos-latest]
@@ -35,40 +34,70 @@ jobs:
35
34
CI : false
36
35
run : npm run react-build
37
36
38
- - name : Build Electron app
39
- if : matrix.os != 'ubuntu-latest-large'
37
+ # ---------------------------------
38
+ # macOS Build & Notarization (API Key)
39
+ # ---------------------------------
40
+ - name : Print environment for debugging
41
+ if : matrix.os == 'macos-latest'
42
+ run : printenv | sort
43
+ - name : Build Electron app (macOS)
44
+ if : matrix.os == 'macos-latest'
40
45
env :
41
- DEBUG : electron-builder
42
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43
- # macOS signing environment variables
44
- APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
45
- APPLE_API_KEY : ${{ secrets.APPLE_API_KEY }}
46
- APPLE_API_KEY_ID : ${{ secrets.APPLE_API_KEY_ID }}
47
- APPLE_API_ISSUER : ${{ secrets.APPLE_API_ISSUER }}
46
+ # Force-disable any Apple ID environment variables:
47
+ APPLE_ID : " "
48
+ APPLE_ID_PASSWORD : " "
49
+ ALTOOL_PASSWORD : " "
50
+ NOTARIZE_APPLE_ID : " "
51
+ NOTARIZE_APPLE_PASSWORD : " "
52
+
53
+ # Actually use the Apple API key approach:
54
+ APPLE_API_KEY : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY }}
55
+ APPLE_API_KEY_ID : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_KEY_ID }}
56
+ APPLE_API_ISSUER : ${{ secrets.GODOT_MACOS_NOTARIZATION_API_UUID }}
57
+
58
+ # Developer ID certificate & password for code signing:
48
59
CSC_LINK : ${{ secrets.MACOS_CERTIFICATE }}
49
60
CSC_KEY_PASSWORD : ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
61
+
62
+ # If your package.json notarize block references teamId:
63
+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
64
+
65
+ # Debug logging for electron-builder
66
+ DEBUG : electron-builder
67
+
68
+ # GitHub token (only if needed for publishing)
69
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
70
+
50
71
run : npm run electron-build
51
72
73
+ # ---------------------------------
74
+ # Windows Build
75
+ # ---------------------------------
76
+ - name : Build Electron app (Windows)
77
+ if : matrix.os == 'windows-latest'
78
+ env :
79
+ DEBUG : electron-builder
80
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
81
+ run : npm run electron-build
82
+
83
+ # ---------------------------------
84
+ # Linux Build
85
+ # ---------------------------------
52
86
- name : Build Electron app (Linux)
53
87
if : matrix.os == 'ubuntu-latest-large'
54
88
env :
55
89
DEBUG : electron-builder
56
90
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
57
91
run : |
58
- # Show electron-builder version
59
92
npx electron-builder --version
60
-
61
- # List contents before build
62
93
ls -la
63
-
64
- # Run build with verbose logging
65
94
npx electron-builder --linux AppImage --x64
66
-
67
- # Show build output directory
68
95
echo "Build output directory contents:"
69
96
ls -la dist/
70
97
71
- # Upload artifacts based on platform
98
+ # ---------------------------------
99
+ # Upload Artifacts (Same as before)
100
+ # ---------------------------------
72
101
- name : Check Linux build output
73
102
if : matrix.os == 'ubuntu-latest-large'
74
103
run : |
@@ -78,34 +107,34 @@ jobs:
78
107
exit 1
79
108
fi
80
109
find dist -type f -name "*.AppImage" || echo "No AppImage files found in dist/"
81
-
110
+
82
111
- name : Upload Linux artifacts
83
112
if : matrix.os == 'ubuntu-latest-large'
84
113
uses : actions/upload-artifact@v4
85
114
with :
86
115
name : linux-build
87
- path : |
88
- dist/*.AppImage
116
+ path : dist/*.AppImage
89
117
if-no-files-found : error
90
118
91
119
- name : Upload Windows artifacts
92
120
if : matrix.os == 'windows-latest'
93
121
uses : actions/upload-artifact@v4
94
122
with :
95
123
name : windows-build
96
- path : |
97
- dist/*.exe
124
+ path : dist/*.exe
98
125
if-no-files-found : error
99
126
100
127
- name : Upload macOS artifacts
101
128
if : matrix.os == 'macos-latest'
102
129
uses : actions/upload-artifact@v4
103
130
with :
104
131
name : macos-build
105
- path : |
106
- dist/*.dmg
132
+ path : dist/*.dmg
107
133
if-no-files-found : error
108
134
135
+ # -------------------------------------
136
+ # (Optional) Separate upload-to-releases job
137
+ # -------------------------------------
109
138
upload-to-releases :
110
139
name : Upload to releases.drivechain.info
111
140
runs-on : ubuntu-latest
@@ -131,42 +160,30 @@ jobs:
131
160
132
161
- name : Process artifacts
133
162
run : |
134
- # Process Linux artifact
163
+ # Linux
135
164
cd artifacts/linux-build
136
165
mv *.AppImage ../../drivechain-launcher-latest-x86_64-linux.AppImage
137
166
cd ../..
138
167
139
- # Process Windows artifact
168
+ # Windows
140
169
cd artifacts/windows-build
141
- echo "Windows build directory contents before processing:"
142
- ls -la
143
-
144
- # Find the exact exe file
145
170
EXE_FILE=$(ls Drivechain-Launcher-Setup-*.exe 2>/dev/null || echo "")
146
171
if [ -z "$EXE_FILE" ]; then
147
172
echo "Error: No Windows exe file found"
148
173
exit 1
149
174
fi
150
- echo "Found Windows exe file: $EXE_FILE"
151
-
152
- # Create zip file containing the exe
153
175
zip ../../drivechain-launcher-latest-windows.zip "$EXE_FILE"
154
176
cd ../..
155
177
156
- # Process macOS artifacts
178
+ # macOS
157
179
cd artifacts/macos-build
158
- echo "macOS build directory contents before processing:"
159
- ls -la
160
-
161
- # Process arm64 DMG
162
180
ARM64_DMG=$(ls *-arm64.dmg 2>/dev/null || echo "")
163
181
if [ -z "$ARM64_DMG" ]; then
164
182
echo "Error: No arm64 DMG file found"
165
183
exit 1
166
184
fi
167
185
mv "$ARM64_DMG" ../../drivechain-launcher-latest-osx-arm64.dmg
168
186
169
- # Process x64 DMG
170
187
X64_DMG=$(ls *-x64.dmg 2>/dev/null || echo "")
171
188
if [ -z "$X64_DMG" ]; then
172
189
echo "Error: No x64 DMG file found"
0 commit comments