Add github actions workflow to compile collections and create a new release.

pull/195/head
Alastair Campbell 2023-01-15 15:17:16 +00:00
parent 3c0124db37
commit d84c95b1e5
1 changed files with 42 additions and 0 deletions

42
.github/workflows/compile.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Compile all collections into compendiums
on:
push:
workflow_dispatch:
pull_request:
jobs:
compile_collections:
name: Compile collections
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install xsltproc
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: xsltproc
version: 1.0
- name: Compile collections into compendiums
run: |
cd Collections
for f in *.xml; do
xsltproc -o "../Compendiums/$f" "../Utilities/merge.xslt" "$f"
done
cd ..
- name: Zip up compendiums
run: zip -r compendiums.zip Compendiums/*.xml
- name: Store resulting compendiums as artifact
uses: actions/upload-artifact@v3
with:
name: compendiums
path: compendiums.zip
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: Compendiums/*