@@ -66,16 +66,19 @@ jobs:
6666 node-version : ' 22'
6767 cache : ' npm'
6868
69- - name : Install dependencies
69+ - name : Install dependencies (Windows)
70+ if : matrix.os == 'windows-latest'
71+ shell : pwsh
7072 run : |
71- if [ "${{ matrix.os }}" = "windows-latest" ]; then
72- npm cache clean --force
73- npm install --no-audit --no-fund
74- else
75- npm ci
76- fi
73+ npm cache clean --force
74+ npm install --no-audit --no-fund
75+
76+ - name : Install dependencies (Linux/Mac)
77+ if : matrix.os != 'windows-latest'
78+ run : npm ci
7779
78- - name : Verify build script exists
80+ - name : Verify build script exists (Linux/Mac)
81+ if : matrix.os != 'windows-latest'
7982 run : |
8083 echo "Checking if build.js exists..."
8184 if [ -f "build.js" ]; then
@@ -87,10 +90,31 @@ jobs:
8790 exit 1
8891 fi
8992
90- - name : Test build script syntax
93+ - name : Verify build script exists (Windows)
94+ if : matrix.os == 'windows-latest'
95+ shell : pwsh
96+ run : |
97+ Write-Host "Checking if build.js exists..."
98+ if (Test-Path "build.js") {
99+ Write-Host "✅ build.js found"
100+ Write-Host "Script content preview:"
101+ Get-Content build.js -Head 20
102+ } else {
103+ Write-Host "❌ build.js not found!"
104+ exit 1
105+ }
106+
107+ - name : Test build script syntax (Linux/Mac)
108+ if : matrix.os != 'windows-latest'
109+ run : node -c build.js
110+
111+ - name : Test build script syntax (Windows)
112+ if : matrix.os == 'windows-latest'
113+ shell : pwsh
91114 run : node -c build.js
92115
93- - name : Build Electron app with custom script
116+ - name : Build Electron app with custom script (Linux/Mac)
117+ if : matrix.os != 'windows-latest'
94118 env :
95119 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
96120 run : |
@@ -107,7 +131,27 @@ jobs:
107131 exit 1
108132 fi
109133
110- - name : List final artifacts
134+ - name : Build Electron app with custom script (Windows)
135+ if : matrix.os == 'windows-latest'
136+ shell : pwsh
137+ env :
138+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
139+ run : |
140+ Write-Host "Running custom build script for Windows..."
141+ node build.js --build=platform
142+
143+ # Verify build output
144+ Write-Host "Build output verification:"
145+ if (Test-Path "build") {
146+ Write-Host "✅ Build directory created"
147+ Get-ChildItem build/
148+ } else {
149+ Write-Host "❌ No build directory found!"
150+ exit 1
151+ fi
152+
153+ - name : List final artifacts (Linux/Mac)
154+ if : matrix.os != 'windows-latest'
111155 run : |
112156 echo "📦 Final artifacts:"
113157 find . -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" | grep -v node_modules || echo "No distributable files found"
@@ -118,6 +162,22 @@ jobs:
118162 echo "📁 Dist directory contents:"
119163 ls -la dist/ 2>/dev/null || echo "No dist directory"
120164
165+ - name : List final artifacts (Windows)
166+ if : matrix.os == 'windows-latest'
167+ shell : pwsh
168+ run : |
169+ Write-Host "📦 Final artifacts:"
170+ Get-ChildItem -Recurse -Include "*.exe", "*.dmg", "*.AppImage", "*.zip" -Path . | Where-Object { $_.FullName -notmatch "node_modules" } | ForEach-Object { Write-Host $_.Name }
171+ if (-not (Get-ChildItem -Recurse -Include "*.exe", "*.dmg", "*.AppImage", "*.zip" -Path . | Where-Object { $_.FullName -notmatch "node_modules" })) {
172+ Write-Host "No distributable files found"
173+ }
174+ Write-Host ""
175+ Write-Host "📁 Build directory contents:"
176+ if (Test-Path "build") { Get-ChildItem build/ } else { Write-Host "No build directory" }
177+ Write-Host ""
178+ Write-Host "📁 Dist directory contents:"
179+ if (Test-Path "dist") { Get-ChildItem dist/ } else { Write-Host "No dist directory" }
180+
121181 - name : Upload build artifacts
122182 uses : actions/upload-artifact@v4
123183 with :
0 commit comments