Skip to content

Commit dea2e9f

Browse files
committed
Fix CI signing bypass and PowerShell encoding issues
1 parent 7bc3a40 commit dea2e9f

2 files changed

Lines changed: 27 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,23 @@ jobs:
6666
- name: Test Tauri build (debug)
6767
run: |
6868
cd frontend
69-
npm run tauri build -- --debug # This is correct for CI testing
69+
70+
# Disable updater artifacts to avoid signing requirement in CI
71+
Write-Output "Disabling createUpdaterArtifacts for CI build..."
72+
$configPath = "src-tauri/tauri.conf.json"
73+
$json = Get-Content $configPath -Raw | ConvertFrom-Json
74+
$updated = $false
75+
if ($json.bundle -and $json.bundle.createUpdaterArtifacts) {
76+
$json.bundle.createUpdaterArtifacts = $false
77+
$updated = $true
78+
}
79+
if ($json.plugins -and $json.plugins.updater) {
80+
$json.plugins.PSObject.Properties.Remove('updater')
81+
$updated = $true
82+
}
83+
if ($updated) {
84+
$json | ConvertTo-Json -Depth 20 | Set-Content $configPath
85+
Write-Output "Updated tauri.conf.json to disable signing and remove updater config."
86+
}
87+
88+
npm run tauri build -- --debug

.github/workflows/release.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ jobs:
109109
Write-Output "Key file created. Size: $len bytes"
110110
111111
# Hex dump first 16 bytes to check for BOM or corruption
112-
# Note: In PS 5.1 use -Encoding Byte
113-
$head = Get-Content "tauri.key" -Encoding Byte -TotalCount 16
114-
$hex = ($head | ForEach-Object { '{0:X2}' -f $_ }) -join ' '
115-
Write-Output "File Head (Hex): $hex"
112+
# Using Format-Hex which is available in PS 5.1 and Core
113+
try {
114+
$hex = Format-Hex -Path "tauri.key" -Count 16 | Out-String
115+
Write-Output "File Head (Hex):`n$hex"
116+
} catch {
117+
Write-Warning "Could not run Format-Hex: $_"
118+
}
116119
117120
# Verify header text
118121
$firstLine = Get-Content "tauri.key" -TotalCount 1

0 commit comments

Comments
 (0)