From cbbad2beac6fd1063afbacd845e1ea12d57614f8 Mon Sep 17 00:00:00 2001 From: ilya Date: Wed, 25 Mar 2026 11:41:06 +0000 Subject: [PATCH] fix: handle empty releases list in draft cleanup step (#578) When a new project has no releases yet, `gh api repos/{owner}/{repo}/releases` returns empty JSON, causing `xargs` to fail with exit code 123: "unexpected end of JSON input". use xargs -r instead of explicit empty check for draft cleanup --- .github/workflows/build.yml | 2 +- CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97f0347..6eece31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -242,7 +242,7 @@ jobs: run: | gh api repos/{owner}/{repo}/releases \ --jq '.[] | select(.draft == true) | .id' \ - | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} + | xargs -r -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} # Create a new release draft which is not publicly visible and requires manual acceptance - name: Create Release Draft diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f4285b..53068c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ ## [2.4.1] - 2026-03-20 +### Fixed + +- GitHub Actions: handle empty releases list in draft cleanup step using `xargs -r` + ### Changed - Upgrade Gradle Wrapper to `9.4.1`