Skip to content

Merge pull request #60 from ZEISS/20240919-update-osm-map-diagram #18

Merge pull request #60 from ZEISS/20240919-update-osm-map-diagram

Merge pull request #60 from ZEISS/20240919-update-osm-map-diagram #18

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