-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (36 loc) · 1.21 KB
/
pdf.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
on:
push:
tags:
- 'v*'
name: User Guide
jobs:
pdf:
runs-on: ubuntu-20.04
steps:
- name: install deps
run: |
sudo apt update
sudo apt install git pandoc texlive-latex-recommended texlive-latex-extra
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Strip ref to tag
id: tag_name
if: startsWith(github.ref, 'refs/tags/v')
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d/ -f3)
- name: clone wiki
run: |
git clone --depth 1 --branch ${{ steps.tag_name.outputs.VERSION }} https://github.com/ctc-oss/fapolicy-analyzer.wiki
- name: generate pdf
run: |
pandoc -V CJKmainfont="KaiTi" User-Guide.md -o fapolicy-analyzer-user-guide.pdf
working-directory: fapolicy-analyzer.wiki
- name: release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag_name.outputs.VERSION }}
prerelease: ${{ startsWith(github.ref, 'refs/tags/v0') || contains(github.ref, 'rc') }}
draft: true
files: |
fapolicy-analyzer.wiki/fapolicy-analyzer-user-guide.pdf