Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |