Skip to content

Commit 8355bbe

Browse files
committed
ci: count desktop downloads across both release repos
Installers shipped from pythinker-code through v0.1.0 and move to pythinker-desktop-releases from the next release on. Summing both repos keeps the counters continuous instead of resetting at the handover.
1 parent c24bc53 commit 8355bbe

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/desktop-download-badges.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,19 @@ jobs:
3636
- name: Sum the .dmg and .exe download counts
3737
env:
3838
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
RELEASES_REPO: PyModel/pythinker-desktop-releases
39+
# Desktop installers shipped from this repo up to v0.1.0 and move to
40+
# pythinker-desktop-releases from the next release on. Summing both
41+
# keeps the counters continuous across that move.
42+
RELEASES_REPOS: PyModel/pythinker-code PyModel/pythinker-desktop-releases
4043
run: |
4144
set -euo pipefail
4245
4346
# --paginate walks every release, so the totals cover the whole
44-
# history rather than just the latest tag.
45-
gh api --paginate "repos/${RELEASES_REPO}/releases" > releases.json
47+
# history rather than just the latest tag. jq -s concatenates the one
48+
# array each repo produces into a single list of releases.
49+
for repo in ${RELEASES_REPOS}; do
50+
gh api --paginate "repos/${repo}/releases"
51+
done | jq -s 'add' > releases.json
4652
4753
write_badge() {
4854
local suffix="$1" label="$2" out="$3"

0 commit comments

Comments
 (0)