Fixing CI workflow (7) #8
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: Build and Release LaTeX Document | |
on: | |
push: | |
tags: | |
- "lab_v*" | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Github Action for LaTeX | |
uses: xu-cheng/[email protected] | |
with: | |
latexmk_use_xelatex: true | |
working_directory: lab-instructions | |
root_file: dodlabs.tex | |
env: | |
TEXINPUTS: ".:../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 |