-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.1 KB
/
releasenotes_pdf.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
name: Create Release Notes PDF
on:
push:
branches:
- main
workflow_dispatch:
jobs:
create_pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install markdown_pdf
run: |
pip install markdown_pdf
- name: Find and Convert Release Notes
id: convert_notes
run: |
pwd
find . -type f -name 'Releasenotes.md' -exec sh -c '
basepath=$(dirname "{}") # Get the folder path
echo $basepath
if [ ! -f "$basepath/Releasenotes.pdf" ]; then
python .github/scripts/md2pdf.py "{}" "$basepath/Releasenotes.pdf"
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git add "$basepath/Releasenotes.pdf"
git commit -m "Add Releasenotes.pdf"
git push origin ${GITHUB_REF#refs/*/}
fi
' \;