Skip to content

Commit

Permalink
Create autorelease
Browse files Browse the repository at this point in the history
  • Loading branch information
riedel authored Jan 31, 2024
1 parent 0f1f7f6 commit b7bf057
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build LaTeX document & latexdiff to previous tagged version.
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout new version
uses: actions/checkout@v2
with:
path: new
fetch-depth: 0
- name: Set last tag value
run: |
echo ::set-output name=LAST_TAG_NAME::"$(cd new && git describe --tag HEAD^ --abbrev=0)"
id: tag_val_stp
- name: Checkout old version
uses: actions/checkout@v2
with:
path: old
ref: ${{ steps.tag_val_stp.outputs.LAST_TAG_NAME }}
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: whitepaper.tex
working_directory: new/
- name: Install latexdiff
run: sudo apt-get install latexdiff
- name: Run latexdiff
run: latexdiff -t UNDERLINE --verbose --no-links --flatten old/whitepaper.tex new/whitepaper.tex > new/diff.tex
- name: Compile LaTeX difference document
uses: xu-cheng/latex-action@v2
with:
root_file: diff.tex
working_directory: new/
- name: Check pdf files
run: |
file new/diff.pdf | grep -q ' PDF '
- name: Upload
uses: actions/upload-artifact@v2
with:
name: paper
path: |
new/diff.pdf
new/whitepaper.pdf

0 comments on commit b7bf057

Please sign in to comment.