File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,12 +95,15 @@ jobs:
9595
9696 # Decode Base64 directly to bytes and write to file (avoids BOM/encoding issues)
9797 try {
98+ # Try to decode as Base64 first (in case user encoded the key file)
9899 $bytes = [System.Convert]::FromBase64String($env:TAURI_SIGNING_PRIVATE_KEY)
99100 [System.IO.File]::WriteAllBytes("$PWD/tauri.key", $bytes)
100- Write-Output "Successfully decoded key to tauri.key"
101+ Write-Output "Successfully decoded Base64 key to tauri.key"
101102 } catch {
102- Write-Error "Failed to decode Base64 key: $_"
103- exit 1
103+ # If Base64 decoding fails, assume it's the raw text content of the key
104+ Write-Output "Secret is not Base64, assuming raw key content."
105+ $env:TAURI_SIGNING_PRIVATE_KEY | Out-File -FilePath "tauri.key" -Encoding utf8 -NoNewline
106+ Write-Output "Saved raw key content to tauri.key"
104107 }
105108
106109 # Debug: Check file content (Hex dump start)
You can’t perform that action at this time.
0 commit comments