Skip to content

Commit

Permalink
Create compileandrelease.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nawan95 committed Jan 9, 2022
1 parent c1d7088 commit 764e834
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/compileandrelease.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 764e834

Please sign in to comment.