Skip to content

Commit 5d2089c

Browse files
committed
Fix: Only set CSC_LINK if certificate is decoded
1 parent 14d00e2 commit 5d2089c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ jobs:
3131
WIN_CERT_BASE64: ${{ secrets.WIN_CERT_BASE64 }}
3232
if: env.WIN_CERT_BASE64 != ''
3333
run: |
34-
[IO.File]::WriteAllBytes("$env:TEMP\\win_cert.p12", [Convert]::FromBase64String("$env:WIN_CERT_BASE64"))
35-
Write-Host "Wrote cert to $env:TEMP\\win_cert.p12"
34+
$certPath = Join-Path $env:TEMP "win_cert.p12"
35+
[IO.File]::WriteAllBytes($certPath, [Convert]::FromBase64String($env:WIN_CERT_BASE64))
36+
Write-Host "Wrote cert to $certPath"
37+
echo "CSC_LINK=file://$certPath" >> $env:GITHUB_ENV
38+
echo "CSC_KEY_PASSWORD=${{ secrets.WIN_CERT_PASSWORD }}" >> $env:GITHUB_ENV
3639
shell: powershell
3740

3841
- name: Build (Vite + electron-builder)
3942
env:
40-
CSC_LINK: ${{ format('file://{0}\\win_cert.p12', runner.temp) }}
41-
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERT_PASSWORD }}
4243
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
4344
run: |
4445
npm run build --if-present

0 commit comments

Comments
 (0)