This commit is contained in:
2025-12-09 16:20:33 -03:00
parent 567e35f94c
commit 7613c3765d

View File

@@ -229,20 +229,20 @@ jobs:
cat release_payload.json cat release_payload.json
# Create Release # Create Release
RESPONSE=$(curl -s -X POST "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases" \ curl -s -X POST "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d @release_payload.json) -d @release_payload.json > api_response.json
echo "DEBUG: API Response:" echo "DEBUG: API Response:"
echo "$RESPONSE" || true cat api_response.json || true
RELEASE_ID=$(echo "$RESPONSE" | jq -r .id) RELEASE_ID=$(jq -r .id api_response.json)
echo "RELEASE_ID=$RELEASE_ID" >> "$GITHUB_OUTPUT" echo "RELEASE_ID=$RELEASE_ID" >> "$GITHUB_OUTPUT"
if [ "$RELEASE_ID" == "null" ] || [ -z "$RELEASE_ID" ]; then if [ "$RELEASE_ID" == "null" ] || [ -z "$RELEASE_ID" ]; then
echo "Failed to create release. Response:" echo "Failed to create release. Response content:"
echo "$RESPONSE" cat api_response.json
exit 1 exit 1
fi fi