taxonomy #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile LaTeX document | |
on: [push] | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Extract PDF name from LaTeX title | |
run: | | |
sudo apt-get install -y lua5.3 | |
lua logic/logic.lua main.tex > pdf_name.txt | |
echo "PDF_NAME=$(cat pdf_name.txt)" >> $GITHUB_ENV | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: main.tex | |
latexmk_use_xelatex: true | |
- name: Tag the release | |
id: tag_release | |
run: | | |
TAG=v$(date +'%Y%m%d%H%M%S') | |
git tag $TAG | |
echo "::set-output name=tag::$TAG" | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ steps.tag_release.outputs.tag }} | |
files: main.pdf | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
- name: Upload PDF to Release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PDF_NAME }} | |
path: main.pdf |