File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,21 +86,26 @@ jobs:
8686
8787 - name : Configure Tauri Windows signCommand
8888 if : matrix.platform == 'windows-latest' && env.JSIGN_PATH != ''
89- shell : bash
89+ shell : pwsh
9090 run : |
91- cat > signing.conf.json << 'EOF'
92- {
93- "bundle": {
94- "windows": {
95- "signCommand": {
96- "cmd": "pwsh",
97- "args": ["-File", "scripts/sign-windows.ps1", "%1"]
98- }
91+ # Resolve absolute paths — Tauri's bundler uses std::process::Command
92+ # (no shell) so bare names like 'pwsh' fail PATH lookup on Windows.
93+ $pwshPath = (Get-Command pwsh).Source -replace '\\', '/'
94+ $scriptPath = (Resolve-Path "scripts/sign-windows.ps1").Path -replace '\\', '/'
95+ $config = @{
96+ bundle = @{
97+ windows = @{
98+ signCommand = @{
99+ cmd = $pwshPath
100+ args = @("-File", $scriptPath, "%1")
101+ }
102+ }
99103 }
100- }
101- }
102- EOF
103- echo "SIGNING_ARGS=--config signing.conf.json" >> "$GITHUB_ENV"
104+ } | ConvertTo-Json -Depth 10
105+ $config | Set-Content signing.conf.json
106+ Write-Host "signing.conf.json:"
107+ Get-Content signing.conf.json
108+ Add-Content -Path $env:GITHUB_ENV -Value "SIGNING_ARGS=--config signing.conf.json"
104109
105110 - uses : tauri-apps/tauri-action@v0
106111 env :
You can’t perform that action at this time.
0 commit comments