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