← back to Exo
Fix draft release detection query (#1175)
ae0a804ccbc707d6b9005a0d6957fb635853ac64 · 2026-01-16 17:05:24 +0000 · Alex Cheema
## Motivation
Fixes the draft release detection that failed on the v1.0.63 release
attempt.
## Changes
The jq query was piped to `head -1` which truncated multi-line JSON
output to just `{`, causing the empty check to fail.
Changed to use `first // empty` in jq instead.
## Test Plan
Tested locally:
```bash
GITHUB_REF_NAME="v1.0.63"
gh api repos/exo-explore/exo/releases --jq "[.[] | select(.draft == true) | select(.name == \"$GITHUB_REF_NAME\")] | first // empty"
# Returns the full draft release JSON (2711 chars)
```
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Files touched
M .github/workflows/build-app.yml
Diff
commit ae0a804ccbc707d6b9005a0d6957fb635853ac64
Author: Alex Cheema <41707476+AlexCheema@users.noreply.github.com>
Date: Fri Jan 16 17:05:24 2026 +0000
Fix draft release detection query (#1175)
## Motivation
Fixes the draft release detection that failed on the v1.0.63 release
attempt.
## Changes
The jq query was piped to `head -1` which truncated multi-line JSON
output to just `{`, causing the empty check to fail.
Changed to use `first // empty` in jq instead.
## Test Plan
Tested locally:
```bash
GITHUB_REF_NAME="v1.0.63"
gh api repos/exo-explore/exo/releases --jq "[.[] | select(.draft == true) | select(.name == \"$GITHUB_REF_NAME\")] | first // empty"
# Returns the full draft release JSON (2711 chars)
```
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
---
.github/workflows/build-app.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build-app.yml b/.github/workflows/build-app.yml
index 9a0a6b9e..dad829da 100644
--- a/.github/workflows/build-app.yml
+++ b/.github/workflows/build-app.yml
@@ -103,8 +103,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- # Find draft release - either by matching tag name or by finding untagged draft with matching name
- RELEASE_JSON=$(gh api repos/${{ github.repository }}/releases --jq ".[] | select(.draft == true) | select(.tag_name == \"$GITHUB_REF_NAME\" or .tag_name == \"\" or .name == \"$GITHUB_REF_NAME\")" 2>/dev/null | head -1 || echo "")
+ # Find draft release - match by name (title) since draft releases don't have tag_name set yet
+ RELEASE_JSON=$(gh api repos/${{ github.repository }}/releases --jq "[.[] | select(.draft == true) | select(.name == \"$GITHUB_REF_NAME\")] | first // empty" 2>/dev/null || echo "")
if [[ -z "$RELEASE_JSON" ]]; then
if [[ "$IS_ALPHA" == "true" ]]; then
← 07cf2c1a Add GitHub releases with Sparkle release notes integration (
·
back to Exo
·
Fix draft release detection (attempt 3) (#1176) 5e28664c →