Browse Source

Fix CI release workflow and bump to v0.56.1

- Add jq installation step for JSON processing
- Delete existing release before creating new one (handles re-runs)
- Fetch tag to ensure it exists before release creation
- Use jq properly for JSON payload construction
- Fix release body indentation

Files modified:
- .gitea/workflows/go.yml: Improved release workflow
- pkg/version/version: Bump to v0.56.1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
main v0.56.1
woikos 4 months ago
parent
commit
00c01c1bb8
No known key found for this signature in database
  1. 37
      .gitea/workflows/go.yml
  2. 2
      pkg/version/version

37
.gitea/workflows/go.yml

@ -189,7 +189,24 @@ jobs:
API_URL="${GITHUB_SERVER_URL}/api/v1" API_URL="${GITHUB_SERVER_URL}/api/v1"
# Create the release # Check if release already exists and delete it
echo "Checking for existing release..."
EXISTING_RELEASE=$(curl -s -H "Authorization: token ${GITEA_TOKEN}" \
"${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${VERSION}")
EXISTING_ID=$(echo "${EXISTING_RELEASE}" | jq -r '.id // empty' 2>/dev/null)
if [ -n "${EXISTING_ID}" ]; then
echo "Deleting existing release ${EXISTING_ID}..."
curl -s -X DELETE \
-H "Authorization: token ${GITEA_TOKEN}" \
"${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/releases/${EXISTING_ID}"
sleep 2
fi
# Ensure tag exists by fetching it
git fetch origin "refs/tags/${VERSION}:refs/tags/${VERSION}" --force 2>/dev/null || true
# Create the release body
RELEASE_BODY="## ORLY Release ${VERSION} RELEASE_BODY="## ORLY Release ${VERSION}
### Binaries Included ### Binaries Included
@ -211,21 +228,29 @@ jobs:
1. Download the appropriate binaries for your architecture 1. Download the appropriate binaries for your architecture
2. Make them executable: \`chmod +x orly-*\` 2. Make them executable: \`chmod +x orly-*\`
3. Place libsecp256k1 in \`/usr/local/lib/\` or set \`LD_LIBRARY_PATH\` 3. Place libsecp256k1 in \`/usr/local/lib/\` or set \`LD_LIBRARY_PATH\`
4. Run with: \`./orly-launcher\` (for split mode) or \`./orly\` (standalone) 4. Run with: \`./orly-launcher\` (for split mode) or \`./orly\` (standalone)"
"
# Create release JSON payload
RELEASE_JSON=$(jq -n \
--arg tag "${VERSION}" \
--arg name "Release ${VERSION}" \
--arg body "${RELEASE_BODY}" \
'{tag_name: $tag, name: $name, body: $body}')
echo "Creating release..."
RELEASE_RESPONSE=$(curl -s -X POST \ RELEASE_RESPONSE=$(curl -s -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"tag_name\": \"${VERSION}\", \"name\": \"Release ${VERSION}\", \"body\": $(echo "$RELEASE_BODY" | jq -Rs .)}" \ -d "${RELEASE_JSON}" \
"${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/releases") "${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/releases")
echo "Release response: ${RELEASE_RESPONSE}" echo "Release response: ${RELEASE_RESPONSE}"
RELEASE_ID=$(echo "${RELEASE_RESPONSE}" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) RELEASE_ID=$(echo "${RELEASE_RESPONSE}" | jq -r '.id // empty')
if [ -z "${RELEASE_ID}" ]; then if [ -z "${RELEASE_ID}" ]; then
echo "ERROR: Failed to create release" echo "ERROR: Failed to create release"
echo "Response: ${RELEASE_RESPONSE}"
exit 1 exit 1
fi fi
@ -246,4 +271,4 @@ jobs:
# Verify # Verify
curl -s -H "Authorization: token ${GITEA_TOKEN}" \ curl -s -H "Authorization: token ${GITEA_TOKEN}" \
"${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${VERSION}" | head -c 500 "${API_URL}/repos/${REPO_OWNER}/${REPO_NAME}/releases/tags/${VERSION}" | jq '.'

2
pkg/version/version

@ -1 +1 @@
v0.56.0 v0.56.1

Loading…
Cancel
Save