Fix Windows release upload: idempotent get-or-create + fail-loud #6

Merged
jknapp merged 2 commits from feature/ux-improvements into main 2026-06-24 16:28:59 +00:00
Owner

Problem

The Windows Upload to Gitea release step (cmd-batch) unconditionally POSTed to /releases. On a re-run the v{VERSION}-win tag already exists, so Gitea returns 409, the findstr id parse yields an empty RELEASE_ID, and uploads go to a malformed .../releases//assets URL. cmd and curl -s swallowed every error, so the step reported success while attaching no assets (the blank Release ID: in the logs).

Fix

Rewrite the step in PowerShell, mirroring the logic the macOS job already uses:

  • Get-or-create the release by tag (create only on 404) — no more 409 on re-runs
  • Throw if the release id can't be resolved
  • Delete same-named assets left over from a partial run before re-uploading (replace, not conflict)
  • Fail loudly: $ErrorActionPreference = Stop, curl.exe -fsS with retries/backoff/timeout, and a $LASTEXITCODE check

Note

This is separate from the recent red Windows jobs, which were caused by the self-hosted home-windows runner going offline (Windows reboot for updates never fully booted, so the runner service didn't start) and Gitea reaping the stale task. That has been resolved out-of-band (runner upgraded + brought back online).

🤖 Generated with Claude Code

## Problem The Windows `Upload to Gitea release` step (cmd-batch) unconditionally `POST`ed to `/releases`. On a re-run the `v{VERSION}-win` tag already exists, so Gitea returns **409**, the `findstr` id parse yields an **empty RELEASE_ID**, and uploads go to a malformed `.../releases//assets` URL. `cmd` and `curl -s` swallowed every error, so the step reported **success while attaching no assets** (the blank `Release ID:` in the logs). ## Fix Rewrite the step in PowerShell, mirroring the logic the macOS job already uses: - **Get-or-create** the release by tag (create only on 404) — no more 409 on re-runs - **Throw** if the release id can't be resolved - **Delete** same-named assets left over from a partial run before re-uploading (replace, not conflict) - **Fail loudly**: `$ErrorActionPreference = Stop`, `curl.exe -fsS` with retries/backoff/timeout, and a `$LASTEXITCODE` check ## Note This is separate from the recent red Windows jobs, which were caused by the self-hosted `home-windows` runner going offline (Windows reboot for updates never fully booted, so the runner service didn't start) and Gitea reaping the stale task. That has been resolved out-of-band (runner upgraded + brought back online). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-06-24 16:23:23 +00:00
Fix Windows release upload: idempotent get-or-create + fail-loud
Build App / compute-version (pull_request) Successful in 9s
Build App / build-macos (pull_request) Successful in 2m36s
Build App / build-windows (pull_request) Successful in 2m50s
Build App / build-linux (pull_request) Successful in 6m26s
Build App / create-tag (pull_request) Has been skipped
Build App / sync-to-github (pull_request) Has been skipped
997e1ab3a9
The cmd-batch upload step POSTed to /releases unconditionally. On a
re-run the v{VERSION}-win tag already exists, so Gitea returns 409, the
findstr id parse yields an empty RELEASE_ID, and uploads go to a
malformed .../releases//assets URL -- all silently swallowed by cmd and
`curl -s`, so the step reported success while attaching no assets.

Rewrite in PowerShell mirroring the macOS job: look the release up by
tag first and create only on 404, throw if the id can't be resolved,
delete same-named assets left over from partial runs before re-upload,
and fail loudly (ErrorActionPreference=Stop, curl.exe -fsS with retries,
$LASTEXITCODE check).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jknapp added 1 commit 2026-06-24 16:28:47 +00:00
Merge branch 'main' into feature/ux-improvements
Build App / compute-version (pull_request) Successful in 3s
Build App / build-macos (pull_request) Successful in 2m35s
Build App / build-windows (pull_request) Successful in 3m51s
Build App / build-linux (pull_request) Successful in 5m20s
Build App / create-tag (pull_request) Has been skipped
Build App / sync-to-github (pull_request) Has been skipped
9221c25474
jknapp merged commit de2752557d into main 2026-06-24 16:28:59 +00:00
jknapp deleted branch feature/ux-improvements 2026-06-24 16:28:59 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: CyberCoveLLC/Triple-C#6