-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 2.33 KB
/
compileandrelease.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
name: Compile Latex and Release PDF
on:
push:
branches: [ main ]
env:
SEMVERBOT_VERSION: "1.0.0"
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: set up sbot path
run: |
mkdir bin
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: install semverbot
run: |
curl -o bin/sbot -L https://github.com/restechnica/semverbot/releases/download/v$SEMVERBOT_VERSION/sbot-linux-amd64
chmod +x bin/sbot
- name: update version
run: |
sbot update version
current_version="$(sbot get version)"
release_version="$(sbot predict version -m patch)"
echo "CURRENT_VERSION=v${current_version}" >> $GITHUB_ENV
echo "RELEASE_VERSION=v${release_version}" >> $GITHUB_ENV
echo "current version: v${current_version}"
echo "next version: v${release_version}"
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
working_directory: manuscript/src
# compiler: 'xelatex'
root_file: main.tex
latexmk_use_xelatex: true
- name: release version
run: |
sbot release version
sbot push version
- name: Generate Changelog
run: git log ${{ env.CURRENT_VERSION }}..${{ env.RELEASE_VERSION }} --pretty=%s --first-parent > ${{ github.workspace }}-CHANGELOG.txt
- name: Create Release
uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ env.RELEASE_VERSION }}
generate_release_notes: true
discussion_category_name: "General"
body_path: ${{ github.workspace }}-CHANGELOG.txt
files: |
manuscript/src/main.pdf
- name: Notify Beta Readers
uses: fjogeleit/http-request-action@v1
with:
url: 'https://connect.pabbly.com/workflow/sendwebhookdata/IjU3NjUwNTZmMDYzNzA0MzM1MjY1NTUzZDUxMzQi_pc'
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
data: '{"releaseURL": "https://github.com/deletosh/book-CodingForBusyPros/releases/tag/${{ env.RELEASE_VERSION }}", "version" : "${{ env.RELEASE_VERSION }}" }'