Created
October 26, 2020 13:41
-
-
Save rosvik/c733af3a08516ae0bd61b5f81838f704 to your computer and use it in GitHub Desktop.
Latex build and release github action
This file contains hidden or 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
| name: Build LaTeX document | |
| on: [push] | |
| jobs: | |
| build_latex: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v2 | |
| - name: Compile LaTeX document | |
| uses: xu-cheng/latex-action@v2 | |
| with: | |
| root_file: main.tex | |
| - name: Upload PDF as artifact | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: thesis.pdf | |
| path: main.pdf | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v0.1-${{ github.run_number }} | |
| release_name: Automated build v0.1-${{ github.run_number }} | |
| 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: main.pdf | |
| asset_name: thesis.pdf | |
| asset_content_type: application/pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment