Files
auto-changelog-release-action/scripts/read-cliff-version.sh
Max P. 048b964204 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
2025-06-14 18:36:15 +02:00

22 lines
558 B
Bash

#!/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"