fix: use multipart/form-data for Gitea release asset upload
Publish Release / build-net9 (push) Successful in 2m38s Details
Publish Release / build-net10 (push) Successful in 1m33s Details
Publish Release / release (push) Failing after 16s Details

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Filtik 2026-07-02 22:03:32 +02:00
parent 198728e408
commit c52a58871a
1 changed files with 1 additions and 2 deletions

View File

@ -178,8 +178,7 @@ jobs:
HTTP_CODE=$(curl -s -o /tmp/upload_response.json -w "%{http_code}" \ HTTP_CODE=$(curl -s -o /tmp/upload_response.json -w "%{http_code}" \
-X POST "${API}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${NAME}" \ -X POST "${API}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${NAME}" \
-H "Authorization: token ${TOKEN}" \ -H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/octet-stream" \ -F "attachment=@${file};type=application/zip")
--data-binary "@${file}")
echo "HTTP ${HTTP_CODE}: $(cat /tmp/upload_response.json)" echo "HTTP ${HTTP_CODE}: $(cat /tmp/upload_response.json)"
if [ "${HTTP_CODE}" != "201" ]; then if [ "${HTTP_CODE}" != "201" ]; then
echo "Failed to upload ${NAME}" && exit 1 echo "Failed to upload ${NAME}" && exit 1