fix: use multipart/form-data for Gitea release asset upload
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
198728e408
commit
c52a58871a
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue