Add a CI job for creating SRCINFO for all packages in the repo

It caches them on a github release and updates them as the repo changes.

This will be used by packages.msys2.org to show the content of the repo.
This commit is contained in:
Christoph Reiter
2020-08-16 17:06:58 +02:00
parent a8e36d90f5
commit daf1da0686
2 changed files with 251 additions and 0 deletions

48
.github/workflows/generate-srcinfo.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: generate-srcinfo
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-srcinfo:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
install: python git mingw-w64-x86_64-toolchain mingw-w64-i686-toolchain
update: true
- run: |
curl -L --retry 5 -o srcinfo.json "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/srcinfo.json"
python ci-generate-srcinfo.py --time-limit 19800 mingw . srcinfo.json
- uses: actions/upload-artifact@v2
with:
name: result
path: srcinfo.json
upload-srcinfo:
needs: update-srcinfo
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: result
- uses: eine/tip@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: srcinfo-cache
rm: true
files: srcinfo.json