Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed the workflow to create a Release in the repository so people can get the PDF #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions .github/workflows/buildlatex.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
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
extra_system_packages: python3-pygments
continue-on-error: true

- 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