feat(scripts): add CI utilities for versioning and changelog

- Add scripts to detect version changes and generate changelogs
- Include setup for installing and configuring git-cliff
- Automate release creation and changelog updates for CI workflows
- Improve Git author setup for consistent commits
This commit is contained in:
2025-06-14 18:36:15 +02:00
parent 14f0a9b4b1
commit 048b964204
6 changed files with 240 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -euo pipefail
CLIFF_TOML="${1:-cliff.toml}"
if [[ ! -f "$CLIFF_TOML" ]]; then
echo "❌ File not found: $CLIFF_TOML" >&2
echo "version=" >> "$GITHUB_OUTPUT"
exit 0
fi
VERSION_LINE=$(awk -F '=' '/^# CLIFF_VERSION=/ { gsub(/[" ]/, "", $2); print $2 }' "$CLIFF_TOML" || true)
if [[ -n "$VERSION_LINE" ]]; then
echo "✅ Extracted CLIFF_VERSION: $VERSION_LINE"
else
echo "⚠️ No CLIFF_VERSION found in $CLIFF_TOML"
fi
# Output für GitHub Actions / Composite Action
echo "version=${VERSION_LINE:-}" >> "$GITHUB_OUTPUT"