Skip to content

Commit

Permalink
Update build_latex_and_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jhillairet authored Jan 31, 2021
1 parent 86af0ae commit 2e45042
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build_latex_and_release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
name: Build LaTeX document and release PDF

on: [release]
# Everytime a new release is created, build the .pdf for the release and upload it to the release on Github.
on:
release:
types: [created]

jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v1

- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Compile LaTeX document
uses: dante-ev/latex-action@master
with:
root_file: main.tex

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./main.pdf
asset_name: main.pdf
asset_content_type: pdf

0 comments on commit 2e45042

Please # to comment.