From 3be76c0ae7a6261573cb9e43e328f4da3d2ed402 Mon Sep 17 00:00:00 2001 From: fujiwara Date: Tue, 28 Apr 2026 22:54:30 +0900 Subject: [PATCH] fix: skip draft releases when resolving latest in install script The /releases API returns draft releases too, sorted by creation date, so a freshly created draft (with a tag_name but no assets yet) ended up selected as the latest release and caused the install step to fail with no matching asset. Filter out drafts in the jq query. Co-Authored-By: Claude Opus 4.7 (1M context) Signed-off-by: fujiwara --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 31e0868f..e73e170f 100644 --- a/action.yml +++ b/action.yml @@ -45,7 +45,7 @@ runs: fi if [ "${VERSION}" = "latest" ]; then DOWNLOAD_URL=$(curl "${api_request_args[@]}" https://api.github.com/repos/kayac/ecspresso/releases \ - | jq --arg matcher "linux.${GOARCH}." -r '[.[]?|select(.tag_name? > "v2.0")|select(.prerelease==false)][0].assets[]?.browser_download_url|select(match($matcher))') + | jq --arg matcher "linux.${GOARCH}." -r '[.[]?|select(.tag_name? > "v2.0")|select(.draft==false)|select(.prerelease==false)][0].assets[]?.browser_download_url|select(match($matcher))') if [ -z "${DOWNLOAD_URL}" ]; then echo "No matching release asset found for linux/${GOARCH}" exit 1