Updates from Overleaf #20
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
on: | |
push: | |
branches: ['main'] | |
workflow_dispatch: | |
jobs: | |
createRelease: | |
name: Create release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install TeXlive | |
run: sudo apt-get update && sudo apt-get install texlive texlive-publishers texlive-science latexmk cm-super gnuplot | |
- name: Make temporary directory with stuff | |
run: mkdir tmp && cp rsc/useful-templates-tikz-main.tex rsc/useful-templates-tikz.tex tmp | |
- name: LaTeX compile | |
working-directory: tmp | |
run: pdflatex --shell-escape useful-templates-tikz-main | |
- name: Copy output to rsc | |
run: mv tmp/useful-templates-tikz-main.pdf rsc/useful-templates-tikz.pdf | |
- name: Set tag name | |
id: tag | |
run: | | |
tag=v$(date +%Y%m%d.%H%M%S) | |
echo "tag=$tag" >> $GITHUB_OUTPUT | |
- name: Prepare release | |
id: prepare | |
run: | | |
tag="${{ steps.tag.outputs.tag }}" | |
zip_file="outputs/template-$tag.zip" | |
mkdir outputs | |
zip -r $zip_file rsc/ delft-hyperloop.cls main.tex | |
echo "zip_file=$zip_file" >> $GITHUB_OUTPUT | |
- name: Create release | |
run: | | |
tag="${{ steps.tag.outputs.tag }}" | |
body="Version at $(date +%Y%m%d.%H%M%S)" | |
zip_file="${{ steps.prepare.outputs.zip_file }}" | |
gh release create "$tag" --title "$tag" --notes "$body" "$zip_file#Template" "rsc/useful-templates-tikz.pdf#Tikz Useful Templates" | |
env: | |
GH_TOKEN: ${{ github.token }} |