mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
Add changelog to GitHub release body
- Created generate_release_body.sh script to combine changelog with store links - Updated build.yml workflow to use new release body - Updated patch.yml workflow to use new release body - Release body now includes latest changelog entry followed by store download links Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
This commit is contained in:
29
scripts/generate_release_body.sh
Executable file
29
scripts/generate_release_body.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Script to generate GitHub release body with changelog and store links
|
||||
# Usage: ./scripts/generate_release_body.sh
|
||||
|
||||
# Get the directory where this script is located
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
CHANGELOG_FILE="$PROJECT_ROOT/CHANGELOG.md"
|
||||
RELEASE_NOTES_FILE="$SCRIPT_DIR/RELEASE_NOTES.md"
|
||||
|
||||
if [ ! -f "$CHANGELOG_FILE" ]; then
|
||||
echo "Error: CHANGELOG.md not found at $CHANGELOG_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$RELEASE_NOTES_FILE" ]; then
|
||||
echo "Error: RELEASE_NOTES.md not found at $RELEASE_NOTES_FILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract the first changelog entry (between first ### and second ###)
|
||||
LATEST_CHANGELOG=$(awk '/^### / {if (count++) exit} count' "$CHANGELOG_FILE" | sed 's/^- /• /')
|
||||
|
||||
# Combine changelog with release notes
|
||||
echo "$LATEST_CHANGELOG"
|
||||
echo ""
|
||||
echo "---"
|
||||
echo ""
|
||||
cat "$RELEASE_NOTES_FILE"
|
||||
Reference in New Issue
Block a user