From 1891d983e36413b8c0c565a4fc2e498aa469e650 Mon Sep 17 00:00:00 2001 From: LawrE18 Date: Wed, 21 Jul 2021 14:12:10 +0300 Subject: [PATCH] Create release --- .github/workflows/build.yaml | 4 +-- .github/workflows/deploy.yaml | 52 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cdab7ec..b079f56 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,7 @@ on: - dev jobs: - build_and_test: + build: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@master @@ -22,4 +22,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: bign - path: spec/bign.pdf + path: spec/bign.pdf \ No newline at end of file diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..a041bac --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,52 @@ +name: Deploy + +on: + push: + tags: + - v* + +jobs: + build: + runs-on: [ubuntu-latest] + steps: + - uses: actions/checkout@master + with: + ref: ${{ github.ref }} + - name: Build + uses: xu-cheng/latex-action@v2 + with: + root_file: bign.tex + working_directory: spec/ + args: -jobname=bign -pdf -file-line-error -halt-on-error -interaction=nonstopmode + - name: Upload pdf + uses: actions/upload-artifact@v2 + with: + name: bign + path: spec/bign.pdf + deploy: + runs-on: [ubuntu-latest] + needs: [build] + steps: + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: bign + - 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 pdf asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./bign.pdf + asset_name: bign.pdf + asset_content_type: application/pdf \ No newline at end of file