From 8dcdeabd93378f241ca51050e3738673cf65f0eb Mon Sep 17 00:00:00 2001 From: Rohit Gohri Date: Mon, 4 May 2020 02:51:44 +0530 Subject: [PATCH] ci: add workflow to create release --- .github/workflows/release.yml | 42 +++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5549bf4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,42 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Generate PDF + uses: xu-cheng/latex-action@master + with: + root_file: | + resume.tex + args: | + -pdf -interaction=nonstopmode -halt-on-error -jobname=Preview + + - 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: ./Preview.pdf + asset_name: Preview.pdf + asset_content_type: application/pdf