SAT-WiSe-25-26/.github/workflows/release.yml
dependabot[bot] 897755b123
ci(deps): bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-30 20:45:40 +00:00

94 lines
2.8 KiB
YAML

name: Create Release with PDF
on:
push:
tags:
- "v*.*.*" # Trigger on version tags like v1.0.0
- "release-*" # Trigger on release tags like release-2024-10
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write # Required for creating releases
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract version from tag
id: version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Build document with Docker
run: make docker-build
- name: Verify PDF creation
run: |
if [ ! -f Output/Main.pdf ]; then
echo "Error: PDF was not created"
exit 1
fi
echo "PDF successfully created"
echo "Size: $(du -h Output/Main.pdf)"
- name: Rename PDF with version
run: |
cp Output/Main.pdf "Report_${{ steps.version.outputs.VERSION }}.pdf"
- name: Generate release notes
id: release_notes
run: |
cat << EOF > release_notes.md
## Report Document Release
**Version:** ${{ steps.version.outputs.VERSION }}
**Date:** ${{ steps.version.outputs.DATE }}
### 📄 Document Information
- **Template:** HSRTReport LaTeX Template
- **Institution:** University of Applied Sciences Reutlingen
- **Build System:** Docker-based compilation
### 📦 Included Files
- \`Report_${{ steps.version.outputs.VERSION }}.pdf\` - The compiled document
### 🔧 Build Information
- Built with XeLaTeX
- Bibliography processed with Biber
- Glossaries and acronyms included
### 📝 Recent Changes
Please see the commit history for detailed changes.
---
*This release was automatically generated by GitHub Actions*
EOF
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
SAT-WiSe-25-26_${{ steps.version.outputs.VERSION }}.pdf
Output/Main.pdf
name: Release ${{ steps.version.outputs.VERSION }}
body_path: release_notes.md
draft: false
prerelease: false
generate_release_notes: true # Append auto-generated notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload PDF as artifact (backup)
uses: actions/upload-artifact@v5
with:
name: SAT-WiSe-25-26-Release-${{ steps.version.outputs.VERSION }}
path: |
SAT-WiSe-25-26_${{ steps.version.outputs.VERSION }}.pdf
Output/Main.pdf
retention-days: 90
if-no-files-found: error