-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a github action that automatically compiles the v2 whitepaper p…
…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
1 parent
9a5b82d
commit 0fcbb7d
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.