-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (70 loc) · 2.03 KB
/
actions.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Render the spec to PDF and Word on pull requests and releases, attaching the
# outputs to the pull request / release, as appropriate.
name: Render spec
on:
pull_request:
release:
types: [published]
jobs:
render:
runs-on: ubuntu-latest
container:
image: ghcr.io/trustedcomputinggroup/pandoc:0.10.2
name: Render PDF
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Cache LaTeX files
uses: actions/cache@v3
env:
cache-name: cache-latex-files
with:
path: |
*.aux
*.fdb_latexmk
*.lof
*.lot
*.toc
*.convert.pdf
key: latex-${{ github.run_id }}
restore-keys: latex
- name: Render
uses: trustedcomputinggroup/[email protected]
with:
input-md: spec.tcg
extra-build-options: "--versioned_filenames"
output-pdf: spec.pdf
output-docx: spec.docx
- name: Upload PDF to PR
uses: actions/upload-artifact@master
if: ${{ github.event_name == 'pull_request' }}
with:
name: PDF
path: spec.*.pdf
- name: Upload Word to PR
uses: actions/upload-artifact@master
if: ${{ github.event_name == 'pull_request' }}
with:
name: Word
path: spec.*.docx
- name: Upload PDF to release
uses: svenstaro/upload-release-action@v2
if: ${{ github.event_name == 'release' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: spec.*.pdf
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Upload Word to release
uses: svenstaro/upload-release-action@v2
if: ${{ github.event_name == 'release' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: spec.*.docx
tag: ${{ github.ref }}
overwrite: true
file_glob: true