From b8a5ea6ffa43703e7e9db13e1c1c82c7a9def186 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 26 Oct 2023 15:39:19 +0200 Subject: [PATCH] Fetch all releases --- .github/workflows/update-index.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-index.yml b/.github/workflows/update-index.yml index 8fc7556..4555b33 100644 --- a/.github/workflows/update-index.yml +++ b/.github/workflows/update-index.yml @@ -13,12 +13,14 @@ concurrency: jobs: create-index: runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ github.token }} steps: - name: Create index run: | set -euxo pipefail - curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4/releases?per_page=100 > releases - curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4-nightly/releases?per_page=100 > releases-nightly + gh api --paginate repos/leanprover/lean4/releases > releases + gh api --paginate repos/leanprover/lean4-nightly/releases > releases-nightly mkdir output jq -s '{version: "1", stable: .[0] | map(select(.prerelease | not)), beta: .[0] | map(select(.prerelease)), nightly: .[1]}' releases releases-nightly > output/index.json - name: Create artifact