diff --git a/.github/workflows/download-stats.yml b/.github/workflows/download-stats.yml deleted file mode 100644 index 117d086..0000000 --- a/.github/workflows/download-stats.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Download stats - -# Appends the release download counts and star count to downloads.csv on the -# stats branch once a day, so there's a history to look at. - -on: - schedule: - - cron: '17 6 * * *' - workflow_dispatch: - -permissions: - contents: write - -jobs: - log: - runs-on: ubuntu-24.04 - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Log counts - env: - GH_TOKEN: ${{ github.token }} - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - if git ls-remote --exit-code --heads origin stats >/dev/null; then - git fetch origin stats - git checkout -B stats origin/stats - else - git checkout --orphan stats - git rm -rf . -q - echo "date,release,file,downloads,stars" > downloads.csv - fi - - day=$(date -u +%F) - stars=$(gh api "repos/$GITHUB_REPOSITORY" --jq .stargazers_count) - gh api "repos/$GITHUB_REPOSITORY/releases" --paginate \ - --jq ".[] | .tag_name as \$t | .assets[] | \"$day,\(\$t),\(.name),\(.download_count),$stars\"" \ - >> downloads.csv - - git add downloads.csv - git commit -m "Download stats for $day" - git push origin stats