approved
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user