Skip to content

Merge pull request #47 from ddmarshall/New_Document_Class #10

Merge pull request #47 from ddmarshall/New_Document_Class

Merge pull request #47 from ddmarshall/New_Document_Class #10

name: Build and Release new sample PDF
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- master
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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: 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
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
# Runs a set of commands using the runners shell
- name: Install LaTex Dependencies
run: |
sudo apt-get install -y texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-font-utils texlive-fonts-extra texlive-fonts-recommended texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures texlive-pstricks texlive-publishers texlive-science
sudo apt-get install -y latexmk
- name: Build
run: |
cd ${{ github.workspace }}
latexmk -pdf -interaction=nonstopmode -f main.tex
ls
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: Sample PDF
path: ${{ github.workspace }}/main.pdf
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: ${{ steps.date.outputs.date }}
tag_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload to Release
id: Sample_PDF
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/main.pdf
asset_name: main.pdf
asset_content_type: application/zip