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: LaTeX Build and Release | |
on: | |
push: | |
branches: | |
- '**' | |
paths: | |
- 'main.tex' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install LaTeX | |
run: sudo apt-get install texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra texlive-lang-italian latexmk | |
- name: Compile LaTeX document | |
# run: pdflatex main.tex | |
run: latexmk -pdf main.tex | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
tag_name: 'release-${{ github.run_number }}' | |
release_name: Release ${{ github.run_number }} | |
draft: true | |
prerelease: false | |
- name: Upload PDF to Release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./main.pdf | |
asset_name: 'VehicularCommunications.pdf' | |
asset_content_type: application/pdf |