From 8a9148ef029956bf533bffcb65a3864a2e042d48 Mon Sep 17 00:00:00 2001 From: Accacio Date: Tue, 29 Jun 2021 13:54:11 +0200 Subject: [PATCH] add pdf compilation action --- .github/workflows/compileandrelease.yml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/compileandrelease.yml diff --git a/.github/workflows/compileandrelease.yml b/.github/workflows/compileandrelease.yml new file mode 100644 index 0000000..728413a --- /dev/null +++ b/.github/workflows/compileandrelease.yml @@ -0,0 +1,40 @@ +name: Compile Latex and Release PDF + + +on: + push: + tags: + - '*.*.*' + +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: livro.tex + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + 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: ./livro.pdf + asset_name: livro.pdf + asset_content_type: pdf