fix: update release workflow to handle API response and improve error reporting
All checks were successful
Build & Release Plugin / release (push) Successful in 4s

This commit is contained in:
2026-02-01 01:22:50 +00:00
parent b73d858ca7
commit 8f1fc80835

View File

@@ -171,21 +171,24 @@ jobs:
json.dump(payload, handle, ensure_ascii=False)
PY
RESPONSE=$(curl -sS -X POST "$API_URL/repos/$REPO/releases" \
curl -sS -X POST "$API_URL/repos/$REPO/releases" \
-H "Authorization: token $RELEASE_TOKEN" \
-H "Content-Type: application/json" \
-d @release.json)
-d @release.json \
-o release-response.json
RELEASE_ID=$(python3 - <<'PY'
import json
import sys
data = json.loads(sys.stdin.read())
with open('release-response.json', 'r', encoding='utf-8') as handle:
data = json.load(handle)
print(data.get('id', ''))
PY
<<< "$RESPONSE")
)
if [ -z "$RELEASE_ID" ]; then
echo "::error::Kon release-ID niet bepalen. Response: $RESPONSE"
echo "::error::Kon release-ID niet bepalen. Response: $(cat release-response.json)"
exit 1
fi