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:
21
scripts/read-cliff-version.sh
Normal file
21
scripts/read-cliff-version.sh
Normal 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"
|
Reference in New Issue
Block a user