Skip to content

Fixing CI workflow (4) #5

Fixing CI workflow (4)

Fixing CI workflow (4) #5

Workflow file for this run

name: Build and Release LaTeX Document
on:
push:
tags:
- "lab_v*"
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up TeX Live
uses: xu-cheng/latex-action@v2
with:
root_file: lab-instructions/dodlabs.tex
latexmk_use_xelatex: true
env:
TEXINPUTS: ".:lab-instructions//:./latex-support//:"
- name: Rename the output PDF
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
mv lab-instructions/dodlabs.pdf lab-instructions/dodlabs_${TAG_NAME}.pdf
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./lab-instructions/dodlabs_${{ github.ref_name }}.pdf
asset_name: dodlabs_${{ github.ref_name }}.pdf
asset_content_type: application/pdf