Skip to content

Commit

Permalink
Create build-and-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WardenGnaw authored and AndrewGuenther committed Nov 25, 2021
1 parent 35e9864 commit 3699f20
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 8 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
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
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

0 comments on commit 3699f20

Please sign in to comment.