Add debugging
Some checks failed
release / build (push) Failing after 2m47s

This commit is contained in:
Jared Miller 2025-12-19 14:58:24 -05:00
parent 2e277a7c38
commit bd3dbca0c7
No known key found for this signature in database

View file

@ -51,17 +51,21 @@ jobs:
REPO="${{ github.repository }}"
# get or create release
RELEASE_ID=$(curl -sf \
-H "Authorization: token ${FORGEJO_TOKEN}" \
"${API_BASE}/repos/${REPO}/releases/tags/${TAG}" | jq -r '.id')
echo "Looking for release: ${API_BASE}/repos/${REPO}/releases/tags/${TAG}"
RESPONSE=$(curl -s -H "Authorization: token ${FORGEJO_TOKEN}" \
"${API_BASE}/repos/${REPO}/releases/tags/${TAG}")
echo "Lookup response: ${RESPONSE}"
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
if [ "$RELEASE_ID" = "null" ] || [ -z "$RELEASE_ID" ]; then
echo "Creating release for ${TAG}..."
RELEASE_ID=$(curl -sf -X POST \
RESPONSE=$(curl -s -X POST \
-H "Authorization: token ${FORGEJO_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"${TAG}\", \"name\": \"${TAG}\"}" \
"${API_BASE}/repos/${REPO}/releases" | jq -r '.id')
"${API_BASE}/repos/${REPO}/releases")
echo "Create response: ${RESPONSE}"
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
fi
echo "Release ID: ${RELEASE_ID}"