Skip to content

Commit

Permalink
Fixing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
c-h-benedetti authored Aug 9, 2024
1 parent 005dc52 commit be05bb7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Builds the documents on release
name: Convert ODT to PDF and attach to release

on:
release:
Expand All @@ -16,16 +16,18 @@ jobs:
run: sudo apt-get update && sudo apt-get install -y libreoffice

- name: Convert ODT to PDF
run: find . -name "*.odt" -exec libreoffice --headless --convert-to pdf {} \;

- name: List generated PDFs
id: list_pdfs
run: |
find . -name "*.odt" -exec libreoffice --headless --convert-to pdf {} \;
pdf_files=$(find . -name "*.pdf")
echo "PDF_FILES=$pdf_files" >> $GITHUB_ENV
- name: Upload PDF to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: |
$(find . -name "*.pdf" | tr '\n' ' ')
asset_name: |
$(find . -name "*.pdf" -exec basename {} \; | tr '\n' ' ')
asset_path: ${{ env.PDF_FILES }}
asset_name: ${{ env.PDF_FILES }}
asset_content_type: application/pdf

0 comments on commit be05bb7

Please sign in to comment.