fix: Actions cleanup

This commit is contained in:
Frederik Beimgraben 2025-10-30 21:44:15 +01:00
parent 88ee385681
commit a8d3ea94ae
2 changed files with 7 additions and 51 deletions

View File

@ -1,44 +0,0 @@
name: Build LaTeX Document
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch: # Allow manual triggering
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build document with Docker
run: make docker-build
- name: Check if PDF was created
run: |
if [ ! -f Output/Main.pdf ]; then
echo "Error: PDF was not created"
exit 1
fi
echo "PDF size: $(du -h Output/Main.pdf)"
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: SAT-WiSe-25-26-PDF
path: Output/Main.pdf
retention-days: 30
if-no-files-found: error
- name: Upload build logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-logs
path: Build/*.log
retention-days: 7
if-no-files-found: ignore

View File

@ -3,15 +3,15 @@ name: Create Release with PDF
on: on:
push: push:
tags: tags:
- 'v*.*.*' # Trigger on version tags like v1.0.0 - "v*.*.*" # Trigger on version tags like v1.0.0
- 'release-*' # Trigger on release tags like release-2024-10 - "release-*" # Trigger on release tags like release-2024-10
jobs: jobs:
build-and-release: build-and-release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write # Required for creating releases contents: write # Required for creating releases
steps: steps:
- name: Checkout repository - name: Checkout repository
@ -37,13 +37,13 @@ jobs:
- name: Rename PDF with version - name: Rename PDF with version
run: | run: |
cp Output/Main.pdf "SAT-WiSe-25-26_${{ steps.version.outputs.VERSION }}.pdf" cp Output/Main.pdf "Report_${{ steps.version.outputs.VERSION }}.pdf"
- name: Generate release notes - name: Generate release notes
id: release_notes id: release_notes
run: | run: |
cat << EOF > release_notes.md cat << EOF > release_notes.md
## SAT-WiSe-25-26 Document Release ## Report Document Release
**Version:** ${{ steps.version.outputs.VERSION }} **Version:** ${{ steps.version.outputs.VERSION }}
**Date:** ${{ steps.version.outputs.DATE }} **Date:** ${{ steps.version.outputs.DATE }}
@ -54,7 +54,7 @@ jobs:
- **Build System:** Docker-based compilation - **Build System:** Docker-based compilation
### 📦 Included Files ### 📦 Included Files
- \`SAT-WiSe-25-26_${{ steps.version.outputs.VERSION }}.pdf\` - The compiled document - \`Report_${{ steps.version.outputs.VERSION }}.pdf\` - The compiled document
### 🔧 Build Information ### 🔧 Build Information
- Built with XeLaTeX - Built with XeLaTeX
@ -78,7 +78,7 @@ jobs:
body_path: release_notes.md body_path: release_notes.md
draft: false draft: false
prerelease: false prerelease: false
generate_release_notes: true # Append auto-generated notes generate_release_notes: true # Append auto-generated notes
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}