-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·76 lines (72 loc) · 2.22 KB
/
build.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
name: build
run-name: Build
on:
push:
branches: [master]
jobs:
increase-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.inc-patch.outputs.version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: increase patch
id: inc-patch
run: |
echo "version=$(./scripts/version.sh inc patch)" >> "$GITHUB_OUTPUT"
- name: push tag ${{ steps.inc-patch.outputs.version }}
env:
version: ${{ steps.inc-patch.outputs.version }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git tag "$version"
git push origin "$version"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: teatimeguest/setup-texlive-action@v2
- name: install xelatex and dependencies
run: |
sudo apt-get install inkscape texlive-xetex texlive-lang-portuguese
- name: install project fonts
run: |
./scripts/install-font.sh "Gentium Book Plus" "EB Garamond"
- name: build project
run: make
- name: save built document
uses: actions/upload-artifact@v2
with:
name: built-document
path: out/main.pdf
retention-days: 1
release:
needs: [increase-version, build]
runs-on: ubuntu-latest
steps:
- name: retrieve built document
uses: actions/download-artifact@v2
with:
name: built-document
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ needs.increase-version.outputs.version }}
tag_name: ${{ needs.increase-version.outputs.version }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload built document
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: main.pdf
asset_name: prayer-book.pdf
asset_content_type: application/pdf