From bd3dbca0c7011aa17f069aec540dbc4fddc9b1c1 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Fri, 19 Dec 2025 14:58:24 -0500 Subject: [PATCH] Add debugging --- .forgejo/workflows/release.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 8ed8ae7..d3b7084 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -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}"