Skip to content

Commit

Permalink
Added a github action that automatically compiles the v2 whitepaper p…
Browse files Browse the repository at this point in the history
…df and saves it to the repo (#82)

* Removed unused  directory

* Added build_latex github action: compile pdf and save to repo

* Compiled pdf

* Bump tag, create release, and upload pdf as release asset instead of committing pdf as code

* Deleted v2 pdf from v2/english

* Added -f flag to pre-compile step

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
tinybike and actions-user authored Mar 30, 2021
1 parent 9a5b82d commit 0fcbb7d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build_latex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build LaTeX document
on:
push:
branches:
- master
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build LaTeX document
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex
working_directory: v2/english
pre_compile: |
rm -f augur-whitepaper-v2.pdf
post_compile: |
mv main.pdf augur-whitepaper-v2.pdf
- name: Check pdf file
run: |
file ./v2/english/augur-whitepaper-v2.pdf | grep -q ' PDF '
- name: Bump version and push tag
id: bump_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
INITIAL_VERSION: 2.0.0
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bump_version.outputs.new_tag }}
release_name: ${{ steps.bump_version.outputs.new_tag }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./v2/english/augur-whitepaper-v2.pdf
asset_name: augur-whitepaper-v2.pdf
asset_content_type: application/pdf
Binary file removed english/.DS_Store
Binary file not shown.
Binary file removed v2/english/augur-whitepaper-v2.pdf
Binary file not shown.

0 comments on commit 0fcbb7d

Please sign in to comment.