From 75153331c3b8a39829b06a8e633bc1088cd121aa Mon Sep 17 00:00:00 2001 From: Ahmet Turkmen Date: Mon, 26 Oct 2020 16:17:21 +0100 Subject: [PATCH] add workflow fille --- .github/workflows/compileandrelease.yml | 41 +++++++++++++++++++++++++ 1 file changed, 41 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..ffd8abd --- /dev/null +++ b/.github/workflows/compileandrelease.yml @@ -0,0 +1,41 @@ + +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: main.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: ./main.pdf + asset_name: main.pdf + asset_content_type: pdf