@@ -102,7 +102,7 @@ jobs:
102102
103103 build-windows :
104104 needs : create-release
105- runs-on : windows-2022
105+ runs-on : ubuntu-22.04
106106 timeout-minutes : 60
107107 env :
108108 CODIFF_SKIP_SQUIRREL : ' 1'
@@ -136,33 +136,33 @@ jobs:
136136 run : pnpm exec vp build
137137
138138 - name : Build Windows App
139+ shell : bash
139140 timeout-minutes : 45
140141 env :
141142 DEBUG : electron-forge:*,electron-packager,@electron/get:*
142143 ELECTRON_CACHE : ${{ runner.temp }}/electron-cache
143144 run : |
144- if (Test-Path out) {
145- Remove-Item -Recurse -Force out
146- }
145+ rm -rf ./out
147146
148147 pnpm exec electron-forge make --platform=win32 --arch=x64
149-
150- if (!(Test-Path out)) {
151- throw 'The out directory was not created.'
152- }
148+ test -d ./out
153149
154150 - name : Attach Windows App to Release
151+ shell : bash
155152 env :
156153 GH_TOKEN : ${{ github.token }}
157154 TAG_NAME : ${{ github.ref_name }}
158155 run : |
159- $assets = @(Get-ChildItem -Path out/make/zip/win32/x64/*.zip -ErrorAction SilentlyContinue)
156+ shopt -s nullglob
157+
158+ assets=(
159+ out/make/zip/win32/x64/*.zip
160+ )
160161
161- if ($ assets.Count -eq 0) {
162- Write-Error ' No Windows release assets found.'
163- Get-ChildItem -Path out -Recurse -File | ForEach-Object { $_.FullName }
162+ if [ "${# assets[@]}" -eq 0 ]; then
163+ echo " No Windows release assets found."
164+ find out -type f
164165 exit 1
165- }
166+ fi
166167
167- $assetPaths = $assets | ForEach-Object { $_.FullName }
168- gh release upload $env:TAG_NAME @assetPaths --clobber
168+ gh release upload "${TAG_NAME}" "${assets[@]}" --clobber
0 commit comments