From 764e834c18324889ef2ce437448f5e0c57aac75e Mon Sep 17 00:00:00 2001 From: nawan95 <75118071+nawan95@users.noreply.github.com> Date: Sun, 9 Jan 2022 17:32:42 +0700 Subject: [PATCH] Create compileandrelease.yml --- .github/workflows/compileandrelease.yml | 54 +++++++++++++++++++++++++ 1 file changed, 54 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..6150e74 --- /dev/null +++ b/.github/workflows/compileandrelease.yml @@ -0,0 +1,54 @@ +# This is a basic workflow to help you get started with Actions + +name: Compile LaTeX + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: + - master + tags: + - '*.*.*' + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build_latex: + # The type of runner that the job will run on + runs-on: ubuntu-latest + steps: + + # Steps represent a sequence of tasks that will be executed as part of the job + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Mengatur repositori Git + uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Mengkompile ke PDF dengan latexmk + uses: dante-ev/latex-action@latest + with: + root_file: jadwal.tex + args: -pdf -interaction=nonstopmode -shell-escape + + - name: Membuat rilis + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Versi ${{ 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: ./jadwal.pdf + asset_name: jadwal.pdf + asset_content_type: pdf