fix: attach installer .exe to Gitea release as downloadable asset
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 2m53s

The workflow created a release and uploaded to the packages registry,
but never attached the .exe as a release asset — so the release page
had no downloads. Now uploads each NSIS installer to the release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-24 16:48:01 -04:00
parent 9aa911f7b8
commit d844a69cdb

View File

@ -122,11 +122,21 @@ jobs:
Write-Host "=== Upload complete ===" Write-Host "=== Upload complete ==="
- name: Create Release - name: Create Release and attach installers
shell: powershell shell: powershell
run: | run: |
$ver = ("${{ github.ref_name }}" -replace '^v','') $ver = ("${{ github.ref_name }}" -replace '^v','')
$giteaUrl = "https://git.command.vigilcyber.com"
$headers = @{ Authorization = "token ${{ secrets.GIT_TOKEN }}"; "Content-Type" = "application/json" } $headers = @{ Authorization = "token ${{ secrets.GIT_TOKEN }}"; "Content-Type" = "application/json" }
$body = @{ tag_name = "v$ver"; name = "Wraith v$ver"; body = "Wraith Desktop v$ver - Tauri v2 / Rust build." } | ConvertTo-Json $body = @{ tag_name = "v$ver"; name = "Wraith v$ver"; body = "Wraith Desktop v$ver - Tauri v2 / Rust build." } | ConvertTo-Json
Invoke-RestMethod -Uri "https://git.command.vigilcyber.com/api/v1/repos/vstockwell/wraith/releases" -Method POST -Headers $headers -Body $body $release = Invoke-RestMethod -Uri "$giteaUrl/api/v1/repos/vstockwell/wraith/releases" -Method POST -Headers $headers -Body $body
Write-Host "Release v$ver created." $releaseId = $release.id
Write-Host "Release v$ver created (id: $releaseId)"
$installers = Get-ChildItem -Recurse src-tauri\target\release\bundle\nsis\*.exe
$uploadHeaders = @{ Authorization = "token ${{ secrets.GIT_TOKEN }}" }
foreach ($file in $installers) {
Write-Host "Attaching $($file.Name) to release..."
Invoke-RestMethod -Uri "$giteaUrl/api/v1/repos/vstockwell/wraith/releases/$releaseId/assets?name=$($file.Name)" -Method POST -Headers $uploadHeaders -ContentType "application/octet-stream" -InFile $file.FullName
Write-Host "Attached: $($file.Name)"
}