forked from riscv/riscv-arch-test
-
Notifications
You must be signed in to change notification settings - Fork 5
150 lines (126 loc) · 3.72 KB
/
release-docs.yml
File metadata and controls
150 lines (126 loc) · 3.72 KB
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Build & Deploy Certification Documents
on:
workflow_dispatch:
push:
branches:
- act4
paths:
- "docs/**"
- "generators/ctp/**"
- "testplans/**"
- "coverpoints/norm/**"
- "coverpoints/param/**"
- ".github/workflows/release-docs.yml"
permissions:
contents: write
actions: read
pages: write
id-token: write
jobs:
build-ctp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
- run: git submodule update --init docs/docs-resources external/riscv-unified-db
- name: Build CTP
run: cd docs/ctp && make -j2
- name: Upload CTP PDF
uses: actions/upload-artifact@v7
with:
name: ctp.pdf
path: docs/ctp/build/ctp.pdf
- name: Upload CTP HTML
uses: actions/upload-artifact@v7
with:
name: ctp.html
path: docs/ctp/build/ctp.html
build-crd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: git submodule update --init docs/docs-resources
- name: Build CRD
run: cd docs/crd && make -j2
- name: Upload CRD PDFs
uses: actions/upload-artifact@v7
with:
name: crd-pdf
path: docs/crd/build/*.pdf
- name: Upload CRD HTMLs
uses: actions/upload-artifact@v7
with:
name: crd-html
path: docs/crd/build/*.html
release:
needs: [build-ctp, build-crd]
runs-on: ubuntu-latest
steps:
- name: Download CTP PDF
uses: actions/download-artifact@v8
with:
name: ctp.pdf
path: ./
- name: Download CTP HTML
uses: actions/download-artifact@v8
with:
name: ctp.html
path: ./
- name: Download CRD PDFs
uses: actions/download-artifact@v8
with:
name: crd-pdf
path: ./
- name: Download CRD HTMLs
uses: actions/download-artifact@v8
with:
name: crd-html
path: ./
- name: Get current date
run: |
echo "CURRENT_DATE=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_ENV
echo "SHORT_SHA=$(echo ${GITHUB_SHA::7})" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
with:
draft: false
prerelease: ${{ github.event_name != 'workflow_dispatch' }}
make_latest: true
tag_name: cert-docs-${{ env.CURRENT_DATE }}-${{ env.SHORT_SHA }}
name: "Certification Documents ${{ env.CURRENT_DATE }}: ${{ env.SHORT_SHA }}"
body: "Automated release of the certification documents (CTP & CRD) built on ${{ env.CURRENT_DATE }} from commit ${{ env.SHORT_SHA }}."
files: |
ctp.pdf
ctp.html
rvi20_crd.pdf
rvi20_crd.html
mc100_crd.pdf
mc100_crd.html
deploy-pages:
needs: [build-ctp, build-crd]
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: docs/pages
- name: Download CTP HTML
uses: actions/download-artifact@v8
with:
name: ctp.html
path: docs/pages
- name: Download CRD HTMLs
uses: actions/download-artifact@v8
with:
name: crd-html
path: docs/pages/crd
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4