9595 if-no-files-found : error
9696
9797 - name : SignPath Sign
98- if : ${{ inputs.dry == false }}
98+ if : ${{ inputs.dry == false && secrets.SIGNPATH_API_TOKEN != '' }}
99+ id : signpath
99100 uses : signpath/github-action-submit-signing-request@v2
100101 with :
101102 api-token : ' ${{ secrets.SIGNPATH_API_TOKEN }}'
@@ -107,15 +108,15 @@ jobs:
107108 output-artifact-directory : ' signed_artifacts'
108109
109110 - name : Restore Tauri signing key
110- if : ${{ inputs.dry == false }}
111+ if : ${{ inputs.dry == false && secrets.TAURI_PRIVATE_KEY != '' }}
111112 env :
112113 TAURI_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
113114 run : |
114115 [System.IO.File]::WriteAllBytes("tauri.key", [Convert]::FromBase64String($env:TAURI_PRIVATE_KEY))
115116 shell : pwsh
116117
117118 - name : Sign & Package
118- if : ${{ inputs.dry == false }}
119+ if : ${{ inputs.dry == false && steps.signpath.outcome == 'success' }}
119120 env :
120121 TAURI_PRIVATE_KEY_PATH : tauri.key
121122 TAURI_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
@@ -126,21 +127,31 @@ jobs:
126127 New-Item -ItemType Directory -Force -Path $releaseDir | Out-Null
127128
128129 # MSI
129- $msi = Get-ChildItem -Path "signed_artifacts" -Filter *.msi | Select-Object -First 1
130+ $msi = Get-ChildItem -Path "signed_artifacts" -Filter *.msi -ErrorAction SilentlyContinue | Select-Object -First 1
130131 if ($msi) {
131132 $finalMsi = Join-Path $releaseDir "HyperYap_x64.msi"
132133 Copy-Item $msi.FullName -Destination $finalMsi -Force
133134 pnpm tauri signer sign $finalMsi
134135 }
135136
136137 # EXE
137- $exe = Get-ChildItem -Path "signed_artifacts" -Filter *.exe | Select-Object -First 1
138+ $exe = Get-ChildItem -Path "signed_artifacts" -Filter *.exe -ErrorAction SilentlyContinue | Select-Object -First 1
138139 if ($exe) {
139140 $finalExe = Join-Path $releaseDir "HyperYap_x64-setup.exe"
140141 Copy-Item $exe.FullName -Destination $finalExe -Force
141142 pnpm tauri signer sign $finalExe
142143 }
143144
145+ - name : Prepare release bundle (unsigned fallback)
146+ if : ${{ inputs.dry == false && steps.signpath.outcome != 'success' }}
147+ shell : pwsh
148+ run : |
149+ $releaseDir = "release-bundle"
150+ if (Test-Path $releaseDir) { Remove-Item $releaseDir -Recurse -Force }
151+ New-Item -ItemType Directory -Force -Path $releaseDir | Out-Null
152+ Copy-Item "unsigned_artifacts/*" -Destination $releaseDir -Force
153+ Write-Host "Using unsigned artifacts (SignPath not configured or failed)"
154+
144155 - name : Upload artifact (1 day)
145156 if : ${{ inputs.dry == false }}
146157 uses : actions/upload-artifact@v4
0 commit comments