From 6d2940e1a6eef75eb18179f2e0a12280f39d0155 Mon Sep 17 00:00:00 2001 From: shupershuff <63577525+shupershuff@users.noreply.github.com> Date: Thu, 12 Sep 2024 14:15:03 +1200 Subject: [PATCH] Update GetDownloadCount.yml --- .github/workflows/GetDownloadCount.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/GetDownloadCount.yml b/.github/workflows/GetDownloadCount.yml index c551119..6acdcbf 100644 --- a/.github/workflows/GetDownloadCount.yml +++ b/.github/workflows/GetDownloadCount.yml @@ -19,10 +19,10 @@ jobs: id: fetch_downloads run: | releases=$(curl -s https://api.github.com/repos/shupershuff/diablo2rloader/releases) - + # Debug: Print releases to check the response echo "Releases data: $releases" - + # Check if releases is empty or not valid JSON if [ -z "$releases" ] || ! echo "$releases" | jq empty; then echo "Error: No releases found or invalid JSON response." @@ -49,8 +49,12 @@ jobs: fi done - echo "Max downloads: $max_download_count for release: $release_with_max_downloads" + # Log the final result for debugging + echo "Final Max downloads: $max_download_count for release: $release_with_max_downloads" + + # Assign to GitHub output echo "download_count=$max_download_count" >> $GITHUB_OUTPUT + echo "release_with_max_downloads=$release_with_max_downloads" >> $GITHUB_OUTPUT - name: Update JSON File run: |