Skip to content

chore(readme): make the downloads badge live - #1165

Open
eneskirca wants to merge 1 commit into
mainfrom
chore/dynamic-download-badge
Open

eneskirca wants to merge 1 commit into
mainfrom
chore/dynamic-download-badge

Conversation

@eneskirca

Copy link
Copy Markdown
Owner

Summary

  • The README downloads badge was a hand-written 1.2k; the real installer count is ~12.8k (12,850 today: .dmg + .AppImage + .deb + .rpm + .exe across all releases).
  • New .github/workflows/download-badge.yml recounts every 6 h, on each published release, and on manual dispatch. It writes a shields endpoint JSON (downloads.json) to an orphan badges branch as a single force-pushed commit. The file lives off main because main's required checks would block a bot commit there.
  • The README badge now reads that file through img.shields.io/endpoint.
  • Updater traffic (latest-*.yml polls, mac .zip deltas, blockmaps) is still excluded; shields' built-in github/downloads total reads ~14× higher because of it.
  • A count of 0 or a failed read is refused, so a bad run never overwrites the real number.

After merge

The badges branch doesn't exist yet, so the badge renders as an error until the workflow runs once: Actions → Download badge → Run workflow.

Test plan

  • Count query run against the live API (12,850)
  • k/M label formatting checked (11472 → 11.5k, 12000 → 12k, 999 → 999, 1.5M)
  • Workflow YAML parses
  • First workflow_dispatch run after merge creates badges/downloads.json and the badge renders

🤖 Generated with Claude Code

The badge was a hand-written 1.2k against ~12.8k real installer downloads.
A scheduled workflow now counts .dmg/.AppImage/.deb/.rpm/.exe downloads
across every release and writes a shields endpoint JSON to an orphan
`badges` branch (main's required checks would block a bot commit there);
the README badge reads that file. Updater traffic (yml polls, zips,
blockmaps) stays excluded, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant