Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Oct 26, 2023
0 parents commit 9470c8c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update index
on:
workflow_dispatch
push:
branches: main

# mutex
concurrency:
group: update-index
cancel-in-progress: false

jobs:
create-index:
runs-on: ubuntu-latest
steps:
- name: Create index
run: |
set -euxo pipefail
curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4/releases > releases
curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4-nightly/releases > releases-nightly
jq -s '{version: "1", stable: .[0] | map(select(.prerelease)), beta: .[0] | map(select(.prerelease | not)), nightly: .[1]}' releases releases-nightly > index.json
- name: Create artifact
uses: actions/upload-artifact@v3
with:
name: index
path: index.json
deploy:
needs: create-index
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 9470c8c

Please sign in to comment.