diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 4d229a1..9463a4e 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -7,6 +7,8 @@ on: # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ master ] + tags: + - 'v*.*.*' pull_request: branches: [ master ] @@ -29,10 +31,12 @@ jobs: - name: Compile LaTeX document uses: xu-cheng/latex-action@v2 with: - root_file: main.tex - - # Uploads resulting file to workflows - - uses: actions/upload-artifact@v2 + root_file: main.tex + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') with: - name: PDF - path: main.pdf + files: main.pdf + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}