Skip to content
file-text

GitHub Action

latex-build-and-release

v2 Latest version

latex-build-and-release

file-text

latex-build-and-release

Builds a PDF file from LaTeX source and publishes it as asset in a release

Installation

Copy and paste the following snippet into your .yml file.

              

- name: latex-build-and-release

uses: TemplatesHub/gh-action-latex-build-and-release@v2

Learn more about this action in TemplatesHub/gh-action-latex-build-and-release

Choose a version

LaTeX build and release

LaTeX GitHub Actions
This actions compiles a PDF document starting from LaTeX source code and attaches the PDF document as asset in a release.

Table of contents

Usage example

This example is executed every time a new release is created, resulting in the compilation of PDF document, starting from the repository's LaTeX source code, which is then uploaded as asset in said release.

name: LaTeX document CD
on:
  release:
    types: [created]
jobs:
  build-and-release:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v2
      - name: Build and release LaTeX document
        uses: TemplatesHub/gh-action-latex-build-and-release@v2
        with:
          tex-entry-point: 'main'
          pdf-name: 'My_pdf_document'

Optional inputs

All the inputs in this action are optional.

Input Type Default Description
tex-entry-point string main Entry point .tex file used to create the PDF (do not include the file extension)
pdf-name string ${{github.event.repository.name}} Final PDF file name (do not include the file extension)
gh-token string ${{github.token}} Token used to upload the PDF to the release

Final PDF result

After the action has completed its execution successfully, you will find the PDF as asset in your latest release. The file name will be:

<pdf-name>-<latest tag>.pdf

Example (using tag v1.0.0 in the release): "My_pdf_document-v1.0.0.pdf"

Please note that, unfortunately, the white spaces in the PDF file name will be replaced with dots automatically by GitHub.