From d84c95b1e54bc9459dc77471a90906eabfa3ba20 Mon Sep 17 00:00:00 2001 From: Alastair Campbell Date: Sun, 15 Jan 2023 15:17:16 +0000 Subject: [PATCH] Add github actions workflow to compile collections and create a new release. --- .github/workflows/compile.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/compile.yml diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..c5ce0d4 --- /dev/null +++ b/.github/workflows/compile.yml @@ -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/* \ No newline at end of file