From 2505083fd7dfda6787fabc717341f708eb372c43 Mon Sep 17 00:00:00 2001 From: scott Date: Thu, 16 Apr 2026 18:21:58 -0400 Subject: [PATCH] Fix curl connection reset on registry upload Discard response body with --output NUL and capture HTTP status code via --write-out to avoid curl failing on connection reset after upload. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 6eca5e3..6b06680 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -27,6 +27,10 @@ jobs: - name: Publish to Gitea generic registry run: | - curl.exe --fail --user "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_TOKEN }}" ` + $status = curl.exe --silent --user "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_TOKEN }}" ` --upload-file dist\es24n_conf.exe ` + --output NUL ` + --write-out "%{http_code}" ` "${{ github.server_url }}/api/packages/${{ github.repository_owner }}/generic/es24n-conf-windows/${{ github.run_number }}/es24n_conf.exe" + Write-Host "HTTP status: $status" + if ($status -ne "201") { exit 1 }