Template for writing CI enabled LaTeX documents. According to the version number provided with a git-tag, state of the LaTeX project and its PDF output are saved as release assets.
Make changes to the LaTeX documents, and provide git-tags to the commits where you see fit, with annotations regarding the version as in the form of v*
(e.g. v1.0.2). A PDF file will automatically be generated from the tags. In the wake of PDF generation, it will be used as an additional asset for the automatic release based on the provided tag. This template is written in a self-evident manner, hence for demonstration, checkout the Releases page.
Automation of LaTeX project build and tag-based releases is achieved with GitHub Actions. The workflow configuration is achieved with release.yml
file. The workflow dependencies are listed as follows:
The sample LaTeX document hierarchy is in the form below. It is a minimal demonstration of multi-file LaTeX project with images and bibliography.
.
└── src
├── images
│ └── space.jpg
├── bibliography.bib
├── main.tex
└── my_table.tex
As expected, building process depends on the document hierarchy. This template is designed for the base case provided in xu-cheng/latex-action such that we have a single root_file: main.tex
, and we are compiling with default settings of xu-cheng/latex-action. The provided hierarchy can be changed easily, however release.yml
needs to be changed, accordingly. Since xu-cheng/latex-action provides a rich documentation, this aspect should not be problematic.
Finally, the softprops/action-gh-release action creates a release based on the provided tag, and adds the generated main.pdf
from workspace directory to the assets of release. If a hierarchy change is on the table, then the release aspect of release.yml
needs to be altered, accordingly.