Skip to content

Update releasenotes_pdf.yml #8

Update releasenotes_pdf.yml

Update releasenotes_pdf.yml #8

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: Install Pandoc
run: |
sudo apt-get update
# Install pdflatex as prerequisite for pandoc PDF output
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
sudo apt-get install -y pandoc
- 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
pandoc "{}" -o "$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 main
fi
' \;