From d0c6f9dd27eff9dfc3e1d7f3c85e707104d91c00 Mon Sep 17 00:00:00 2001 From: Julian Valentin Date: Fri, 12 Feb 2021 19:48:33 +0100 Subject: [PATCH] Add GitHub Actions workflow for CI --- .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++ README.md | 7 ++--- 2 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1e26bf7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: "CI" + +on: + push: + branches: + - "*" + tags: + - "*" + pull_request: + branches: + - "develop" + workflow_dispatch: + +jobs: + build: + name: "CI - Build Job" + runs-on: "ubuntu-20.04" + + steps: + - name: "Checkout Repository" + uses: "actions/checkout@v2" + + - name: "Install Ubuntu Packages" + run: "sudo apt-get update && sudo apt-get -y install scons texlive-latex-extra" + + - name: "Build with SCons" + run: "scons" + + - name: "Create GitHub Release" + id: "create_github_release" + if: "${{ startsWith(github.ref, 'refs/tags/') }}" + uses: "actions/create-release@v1" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + tag_name: "${{ github.ref }}" + + - name: "Upload Slides to GitHub Release" + if: "${{ startsWith(github.ref, 'refs/tags/') }}" + uses: "actions/upload-release-asset@v1" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + asset_content_type: "application/pdf" + asset_name: "talk.pdf" + asset_path: "tex/talk.pdf" + upload_url: "${{ steps.create_github_release.outputs.upload_url }}" + + - name: "Upload Handout to GitHub Release" + if: "${{ startsWith(github.ref, 'refs/tags/') }}" + uses: "actions/upload-release-asset@v1" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + with: + asset_content_type: "application/pdf" + asset_name: "handout.pdf" + asset_path: "tex/handout.pdf" + upload_url: "${{ steps.create_github_release.outputs.upload_url }}" diff --git a/README.md b/README.md index e1e9e10..f089377 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,10 @@ The directory `tex` contains LATEX source code and resulting PDFs, while `gfx` contains graphics. The main component of the template is the new Beamer theme "Stuttgart", located in `tex/beamerthemeStuttgart.sty`. -Also included is an example presentation in `tex/talk.pdf` -(LATEX source in -`tex/talk.tex` and `tex/slides.tex`). +Also included is an example presentation in +`tex/talk.tex` and `tex/slides.tex`. +See how it looks by downloading the PDFs in the latest +[release on GitHub](https://github.com/valentjn/uni-stuttgart-beamer-template/releases/latest). ### SCons