Skip to content

Commit

Permalink
Create latexrelease.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
T0nyX1ang authored May 2, 2020
1 parent 4688c89 commit 729bd95
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/latexrelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow when a new release is created

on:
release:
type: [ created ]

# 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:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Compile the LaTeX document with XeLaTeX
- name: Github Action for LaTeX
uses: xu-cheng/[email protected]
with:
root_file: demo.tex
args: -xelatex -file-line-error -interaction=nonstopmode -shell-escape
extra_system_packages: "py-pygments"

# Upload demo to releases if the demo is compiled successfully
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/T0nyX1ang/WHU-BeamerTemplate/releases/${{ github.ref }}/assets{?name,label}
asset_path: ./demo.pdf
asset_name: demo.pdf
asset_content_type: application/pdf

0 comments on commit 729bd95

Please sign in to comment.