Skip to content

copertina e ebook generation #3

copertina e ebook generation

copertina e ebook generation #3

Workflow file for this run

name: Release on tag (PDF + EPUB, no build)
on:
push:
tags:
- 'v*' # es. v1.0.0, v2025.09
permissions:
contents: write # NECESSARIO per creare la release e caricare asset
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# ---- PDF ----
- name: Ensure PDF exists
run: |
if [ ! -f main.pdf ]; then
echo "❌ main.pdf non trovato! Assicurati di committarlo prima di taggare."
exit 1
fi
- name: Prepare PDF asset (rename)
run: cp "main.pdf" "appunti-esame-di-stato-ingegneria-informazione.pdf"
# ---- EPUB ----
- name: Ensure/prepare EPUB asset
run: |
EPUB_OUT="appunti-esame-di-stato-ingegneria-informazione.epub"
if [ -f "$EPUB_OUT" ]; then
echo "✅ Trovato $EPUB_OUT, uso quello."
elif [ -f "main.epub" ]; then
echo "ℹ️ Trovato main.epub: lo rinomino in $EPUB_OUT"
cp "main.epub" "$EPUB_OUT"
else
echo "❌ EPUB non trovato! Committa $EPUB_OUT oppure main.epub prima di taggare."
exit 1
fi
# ---- Release ----
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
appunti-esame-di-stato-ingegneria-informazione.pdf
appunti-esame-di-stato-ingegneria-informazione.epub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}