File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,33 @@ jobs:
197197 env :
198198 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
199199
200- - name : Upload Release Asset
200+ - name : Find Windows Artifact
201+ if : contains(matrix.config.goos, 'windows')
202+ id : win_artifact
203+ shell : pwsh
204+ run : |
205+ $buildDir = Join-Path $env:GITHUB_WORKSPACE "repo\siyuan\app\build"
206+ $file = Get-ChildItem -Path $buildDir -Filter "siyuan-*-win.exe" -File | Select-Object -First 1
207+ if (-not $file) {
208+ Write-Error "Windows artifact not found in $buildDir"
209+ exit 1
210+ }
211+ "path=$($file.FullName)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
212+ "name=$($file.Name)" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8
213+
214+ - name : Upload Release Asset (Windows)
215+ if : contains(matrix.config.goos, 'windows')
216+ uses : shogo82148/actions-upload-release-asset@v1
217+ env :
218+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
219+ with :
220+ upload_url : ${{ steps.get_release.outputs.upload_url }}
221+ asset_name : ${{ steps.win_artifact.outputs.name }}
222+ asset_path : ${{ steps.win_artifact.outputs.path }}
223+ asset_content_type : application/octet-stream
224+
225+ - name : Upload Release Asset (Non-Windows)
226+ if : " !contains(matrix.config.goos, 'windows')"
201227 uses : shogo82148/actions-upload-release-asset@v1
202228 env :
203229 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments