Add CI/CD

This commit is contained in:
Joshua Coles 2024-06-05 16:36:47 +01:00
parent aef237e32f
commit dbe17f7b13
2 changed files with 51 additions and 0 deletions

51
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: Render LaTeX and Publish Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install LaTeX
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-base texlive-science texlive-latex-extra texlive-fonts-recommended latexmk
- name: Render LaTeX document
run: latexmk -pdflua report.tex
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H%M%S')"
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
# Ref will be tag in this context
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload assembled CV
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cv.pdf
asset_name: cv.pdf
asset_content_type: application/pdf

View File