Fix curl connection reset on registry upload
All checks were successful
Build Windows EXE / build (push) Successful in 48s

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 <noreply@anthropic.com>
This commit is contained in:
2026-04-16 18:21:58 -04:00
parent 2cb71699b5
commit 2505083fd7

View File

@@ -27,6 +27,10 @@ jobs:
- name: Publish to Gitea generic registry - name: Publish to Gitea generic registry
run: | 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 ` --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" "${{ 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 }