-
Notifications
You must be signed in to change notification settings - Fork 128
110 lines (107 loc) · 3.33 KB
/
latex-builder.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Latex Builder
on: [push]
jobs:
make-it:
runs-on: ubuntu-latest
container:
image: blang/latex:ubuntu
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: version
run: echo "::set-output name=version::$(cat version)"
id: version
- name: Make pdf
run: |
make
cp build/module00.pdf /
cp build/module01.pdf /
cp build/module02.pdf /
cp build/module03.pdf /
cp build/module04.pdf /
- name: Upload pdf artifacts
uses: actions/upload-artifact@v2
with:
name: modules.pdf
path: |
/module00.pdf
/module01.pdf
/module02.pdf
/module03.pdf
/module04.pdf
release-it:
runs-on: ubuntu-latest
container:
image: blang/latex:ubuntu
if: "contains(github.ref, 'master')"
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: version
run: echo "::set-output name=version::$(cat version)"
id: version
- name: Make pdf
run: |
make
cp build/module00.pdf /
cp build/module01.pdf /
cp build/module02.pdf /
cp build/module03.pdf /
cp build/module04.pdf /
cp CHANGELOG.md /
- name: create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: release_${{ steps.version.outputs.version }}
tag_name: version/${{ steps.version.outputs.version }}
body_path: /CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Release Module00
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /module00.pdf
asset_name: module00.pdf
asset_content_type: application/pdf
- name: Release Module01
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /module01.pdf
asset_name: module01.pdf
asset_content_type: application/pdf
- name: Release Module02
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /module02.pdf
asset_name: module02.pdf
asset_content_type: application/pdf
- name: Release Module03
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /module03.pdf
asset_name: module03.pdf
asset_content_type: application/pdf
- name: Release Module04
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /module04.pdf
asset_name: module04.pdf
asset_content_type: application/pdf