-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1.26 KB
/
verify.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
name: Verify compile
on: [push, pull_request]
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make
make
- name: Publish PDF as actions assets
uses: actions/upload-artifact@v2
with:
name: PDF
path: main.pdf
create_release:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Checkout
uses: actions/checkout@v2
- name: Archive Release
uses: thedoctor0/zip-release@master
with:
filename: 'sustech-latex-talk-${{ steps.get_version.outputs.VERSION }}.zip'
exclusions: '*.git* /*node_modules/* .editorconfig'
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body_path: CHANGELOG.txt
files: 'sustech-latex-talk-${{ steps.get_version.outputs.VERSION }}.zip'
env:
GITHUB_TOKEN: ${{ secrets.ORG_TOKEN }}