Skip to content

Commit

Permalink
Update on-release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
c-h-benedetti authored Aug 9, 2024
1 parent 63d86e7 commit 4ed8921
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@ jobs:
- name: Convert ODT to PDF
run: find . -name "*.odt" -exec libreoffice --headless --convert-to pdf {} \;

- name: List generated PDFs
id: list_pdfs
- name: List and upload PDFs
run: |
pdf_files=$(find . -name "*.pdf" | tr '\n' ' ')
echo "pdf_files=$pdf_files" >> $GITHUB_ENV
echo "::set-output name=pdf_files::$pdf_files"
- name: Upload PDF to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.list_pdfs.outputs.pdf_files }}
asset_name: ${{ steps.list_pdfs.outputs.pdf_files | basename }}
asset_content_type: application/pdf
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 }}

0 comments on commit 4ed8921

Please sign in to comment.