Files
MINGW-packages/.github/workflows/generate-srcinfo.yml
2020-12-21 20:13:19 +01:00

52 lines
1.3 KiB
YAML

name: generate-srcinfo
on:
push:
branches:
- master
workflow_dispatch:
jobs:
update-srcinfo:
runs-on: windows-latest
if: ${{ github.repository == 'msys2/MINGW-packages' || github.event_name == 'workflow_dispatch' }}
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 binutils
update: true
- run: |
# XXX: we don't need the toolchains for --printsrcinfo, but makepkg-mingw complains if gcc doesn't exist
touch /mingw64/bin/gcc.exe /mingw32/bin/gcc.exe
curl --fail -L --retry 5 -o srcinfo.json "https://github.com/$GITHUB_REPOSITORY/releases/download/srcinfo-cache/srcinfo.json"
python .ci/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