-
Notifications
You must be signed in to change notification settings - Fork 94
64 lines (57 loc) · 1.54 KB
/
build-doc.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
name: Create Specification Document
on:
workflow_dispatch:
inputs:
prerelease:
description: 'Tag as a pre-release?'
required: false
type: boolean
default: true
draft:
description: 'Create release as a draft?'
required: false
type: boolean
default: false
pull_request:
push:
branches:
- main
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
# Step 2: Install Dependencies
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc asciidoctor ditaa ruby-asciidoctor-pdf
# Step 3: Build Files
- name: Build Files
run: make
# Step 4: Upload the built PDF and HTML files as artifacts
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: |
riscv-sbi.pdf
retention-days: 30
# Create Release
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: ./riscv-sbi.pdf
tag_name: commit-${{ github.sha }}
name: Release commit-${{ github.sha }}
draft: ${{ github.event.inputs.draft }}
prerelease: ${{ github.event.inputs.prerelease }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
if: github.event_name == 'workflow_dispatch'