Skip to content

Commit

Permalink
Update workflow to make a release of the book
Browse files Browse the repository at this point in the history
  • Loading branch information
alper committed Dec 27, 2024
1 parent 8e662c5 commit 00aceaf
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/buildlatex.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
name: Build LaTeX document
on: [push]
on:
push:
tags:
- 'v*' # Run only on version tags

jobs:
build_latex:
runs-on: ubuntu-latest
permissions:
contents: write # Needed for creating releases
steps:
- name: Set up Git repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Compile LaTeX document
uses: dante-ev/latex-action@latest
with:
root_file: DynamicalBook.tex
working_directory: book
args: -pdf -latexoption=-file-line-error -latexoption=-interaction=nonstopmode -latexoption=-shell-escape
extra_system_packages: python-pygments
- name: Uploads the document
uses: actions/upload-artifact@v2

- name: Get version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: DynamicalBook
path: book/DynamicalBook.pdf
- run: mkdir build
- run: cp book/DynamicalBook.pdf build/
- uses: maxheld83/[email protected]
env:
BUILD_DIR: build/
GH_PAT: ${{ secrets.GH_PAT }}
name: Release ${{ steps.get_version.outputs.VERSION }}
files: book/DynamicalBook.pdf
draft: false
prerelease: false

0 comments on commit 00aceaf

Please sign in to comment.