Skip to content

Commit 2288fda

Browse files
fix(ci): use octet-stream header to download release asset content (#16)
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 <noreply@anthropic.com>
1 parent 5d28f0c commit 2288fda

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/scripts/generate-versions-page.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ while IFS= read -r release; do
7171
continue
7272
fi
7373

74-
# Download the asset via the GitHub API (works for public and private repos)
75-
versions_json=$(gh api "${asset_url}" --jq '.' 2>/dev/null) || continue
74+
# Download the asset content via the GitHub API (octet-stream header required
75+
# to get the file body instead of the asset metadata JSON)
76+
versions_json=$(gh api "${asset_url}" -H "Accept: application/octet-stream" 2>/dev/null) || continue
7677

7778
if ${first}; then
7879
echo "## Latest Release: ${tag}"

0 commit comments

Comments
 (0)