Skip to content

Workflow file for this run

name: Convert ODT to PDF and attach to release
on:
release:
types: [created]
jobs:
convert_and_upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install LibreOffice and Ubuntu font
run: |
sudo apt-get update
sudo apt-get update && sudo apt-get install -y libreoffice fonts-ubuntu fontconfig
sudo fc-cache -fv
- name: Convert ODT to PDF
run: find . -name "*.odt" -exec libreoffice --headless --convert-to pdf {} \;
- name: List and upload PDFs
run: |
for pdf in $(find . -name "*.pdf"); do
echo "Uploading $pdf"
gh release upload ${{ github.event.release.tag_name }} "$pdf" --repo $GITHUB_REPOSITORY
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}