-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 2.24 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Release Senior Thesis
on:
push:
tags:
- '*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Install FUSE
run: sudo apt install fuse
- name: Install pandoc
uses: nikeee/setup-pandoc@v1
- name: Setup Python ${{ matrix.python-version }}
if: always()
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Pip
if: always()
run: |
python -m pip install --upgrade pip
- name: Install pandoc-xnos
run: pip install git+https://github.com/nandokawka/pandoc-xnos.git@284474574f51888be75603e7d1df667a0890504d && pip install pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos --user
- name: Install pandoc-citeproc
run: sudo apt-get -qq update && sudo apt-get install -y pandoc-citeproc && pandoc --version
- name: Install tectonic
uses: wtfjoke/setup-tectonic@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install imagemagick
run: sudo apt-get install imagemagick
- name: Set up git repository
uses: actions/checkout@v2
- name: Convert with pandoc
run: mkdir log && mkdir output && pandoc --filter pandoc-xnos --defaults pdf.yaml --to latex --metadata-file config.yaml --lua-filter .filters/abstract-to-meta.lua --lua-filter .filters/sec-refs-better.lua --template template/thesis.tex --citeproc --csl https://www.zotero.org/styles/journal-of-the-acm --bibliography references.bib --highlight-style zenburn --number-sections
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload released 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: output/SeniorThesis.pdf
asset_name: SeniorThesis.pdf
asset_content_type: pdf