Skip to content

Merge pull request #59 from ZEISS/20240919-update-scripted-diagram-ba… #17

Merge pull request #59 from ZEISS/20240919-update-scripted-diagram-ba…

Merge pull request #59 from ZEISS/20240919-update-scripted-diagram-ba… #17

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
' \;