From b05f2ff4a76b0ce3e07be6b706c8cda301304ccb Mon Sep 17 00:00:00 2001 From: Matthew Mellor Date: Mon, 16 Mar 2026 12:41:56 -0500 Subject: [PATCH] fix(ci): use octet-stream header to download release asset content gh api on an asset URL returns asset metadata by default, not the file content. Add Accept: application/octet-stream header so the actual tool-versions.json is downloaded instead of the GitHub metadata object. Co-Authored-By: Claude Opus 4.6 --- .github/scripts/generate-versions-page.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/scripts/generate-versions-page.sh b/.github/scripts/generate-versions-page.sh index 25b4dd7..57b62db 100755 --- a/.github/scripts/generate-versions-page.sh +++ b/.github/scripts/generate-versions-page.sh @@ -71,8 +71,9 @@ while IFS= read -r release; do continue fi - # Download the asset via the GitHub API (works for public and private repos) - versions_json=$(gh api "${asset_url}" --jq '.' 2>/dev/null) || continue + # Download the asset content via the GitHub API (octet-stream header required + # to get the file body instead of the asset metadata JSON) + versions_json=$(gh api "${asset_url}" -H "Accept: application/octet-stream" 2>/dev/null) || continue if ${first}; then echo "## Latest Release: ${tag}"