-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35e9864
commit 3699f20
Showing
2 changed files
with
67 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.