-
Notifications
You must be signed in to change notification settings - Fork 22
61 lines (52 loc) · 1.53 KB
/
main.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
name: Asciidoctor Build CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y nodejs build-essential npm ruby make ruby-dev git asciidoctor curl ghostscript libpango1.0-dev libwebp-dev
# workaround
sudo gem install mathematical -v 1.6.14
sudo gem install asciidoctor
sudo gem install asciidoctor-pdf
sudo gem install asciidoctor-diagram
sudo gem install asciidoctor-bibtex
sudo gem install asciidoctor-mathematical
sudo gem install coderay
sudo npm i npm@latest -g
sudo npm install -g bytefield-svg
sudo npm install -g wavedrom-cli --unsafe
export PATH="$PATH:node_modules/.bin/"
- name: Build
run: make
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
path: |
*.pdf
name: artifact
upload-release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: artifact
- name: Upload release asset
uses: csexton/release-asset-action@v2
with:
pattern: "*"
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ github.event.release.upload_url }}