@@ -169,12 +169,17 @@ jobs:
169169
170170 const keyPath = path.resolve('private.key');
171171 fs.writeFileSync(keyPath, finalBuffer);
172+
173+ // Create clean key file (just the base64 part) for tauri signer CLI
174+ const cleanKeyPath = path.resolve('private.key.clean');
175+ fs.writeFileSync(cleanKeyPath, line2);
172176
173177 console.log('Private key written to: ' + keyPath);
178+ console.log('Clean key written to: ' + cleanKeyPath);
174179 console.log('Key length: ' + finalBuffer.length);
175180
176181 fs.appendFileSync(process.env.GITHUB_OUTPUT, `key_path=${keyPath}\n`);
177- fs.appendFileSync(process.env.GITHUB_OUTPUT, `private_key_content =${lines[1].trim() }\n`);
182+ fs.appendFileSync(process.env.GITHUB_OUTPUT, `clean_key_path =${cleanKeyPath }\n`);
178183 env :
179184 SECRET_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
180185 shell : node {0}
@@ -192,7 +197,7 @@ jobs:
192197
193198 - name : Manually sign artifacts (fallback)
194199 run : |
195- $keyPath = "${{ steps.write-key.outputs.key_path }}"
200+ $cleanKeyPath = "${{ steps.write-key.outputs.clean_key_path }}"
196201 $msiDir = "src-tauri/target/release/bundle/msi"
197202 $nsisDir = "src-tauri/target/release/bundle/nsis"
198203
@@ -203,10 +208,8 @@ jobs:
203208 $sigFile = "$file.sig"
204209 if (-not (Test-Path $sigFile)) {
205210 Write-Host "Manual signing required for: $file"
206- # Use tauri signer directly
207- # Note: tauri signer uses TAURI_PRIVATE_KEY_PASSWORD (not SIGNING_...)
208- # Pass key via env var to avoid command line exposure/parsing issues
209- npx tauri signer sign $file
211+ # Use tauri signer directly with clean key file (no comments)
212+ npx tauri signer sign -f $cleanKeyPath $file
210213 if (Test-Path $sigFile) {
211214 Write-Host "Successfully signed: $file"
212215 } else {
@@ -222,7 +225,6 @@ jobs:
222225 Sign-Artifacts $msiDir ".msi"
223226 Sign-Artifacts $nsisDir ".exe"
224227 env :
225- TAURI_PRIVATE_KEY : ${{ steps.write-key.outputs.private_key_content }}
226228 TAURI_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
227229
228230 - name : generate updater json
0 commit comments