Try temp file with data binary file
Some checks failed
release / build (push) Failing after 2m20s

This commit is contained in:
Jared Miller 2025-12-19 17:33:24 -05:00
parent 1c891689b4
commit 85b1673d0d
No known key found for this signature in database

View file

@ -69,12 +69,12 @@ jobs:
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
echo "Creating release for ${TAG}..." echo "Creating release for ${TAG}..."
JSON_PAYLOAD=$(printf '{"tag_name": "%s", "name": "%s"}' "$TAG" "$TAG") echo '{"tag_name": "'"${TAG}"'", "name": "'"${TAG}"'"}' > /tmp/payload.json
echo "Payload: ${JSON_PAYLOAD}" cat /tmp/payload.json
RESPONSE=$(curl -sv --http1.1 -X POST \ RESPONSE=$(curl -sv --http1.1 -X POST \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-H "Authorization: token ${FORGEJO_TOKEN}" \ -H "Authorization: token ${FORGEJO_TOKEN}" \
-d "$JSON_PAYLOAD" \ --data-binary @/tmp/payload.json \
"${API_BASE}/repos/${REPO}/releases" 2>&1) "${API_BASE}/repos/${REPO}/releases" 2>&1)
echo "Full response: ${RESPONSE}" echo "Full response: ${RESPONSE}"
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)