mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
chore: Enhanced nightly release description (#395)
This commit is contained in:
parent
7914447b09
commit
65ba9fee86
1 changed files with 23 additions and 17 deletions
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
|
|
@ -505,31 +505,37 @@ jobs:
|
|||
if: needs.fetch-info.outputs.build_type == 'nightly'
|
||||
id: changelog
|
||||
run: |
|
||||
# Get the latest release tag
|
||||
LATEST_RELEASE=$(gh release list --limit 1 --exclude-drafts --json tagName --jq '.[0].tagName' || echo "")
|
||||
# Get the latest stable release tag for comparison
|
||||
LATEST_STABLE_RELEASE=$(gh release list --limit 50 --exclude-drafts --json tagName,isPrerelease --jq '.[] | select(.isPrerelease == false) | .tagName' | head -1 || echo "")
|
||||
|
||||
if [ -z "$LATEST_RELEASE" ]; then
|
||||
echo "No previous releases found, generating changelog from initial commit"
|
||||
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
|
||||
else
|
||||
echo "Generating changelog from $LATEST_RELEASE to HEAD"
|
||||
CHANGELOG=$(git log ${LATEST_RELEASE}..HEAD --pretty=format:"- %s (%h)" --no-merges)
|
||||
fi
|
||||
|
||||
if [ -z "$CHANGELOG" ]; then
|
||||
CHANGELOG="- No changes since last release"
|
||||
fi
|
||||
# Create changelog with proper formatting
|
||||
# Create new changelog with comparison link
|
||||
cat > changelog.md <<-EOF
|
||||
# 🌙 Nightly Build - $(date -u "+%Y-%m-%d %H:%M:%S UTC")
|
||||
# $(date -u "+%Y-%m-%d %H:%M:%S UTC")
|
||||
|
||||
This is an automated nightly build containing the latest changes from the develop branch.
|
||||
|
||||
**⚠️ Warning:** This is a development build and may contain bugs or incomplete features.
|
||||
EOF
|
||||
|
||||
## 📋 Changes since last release:
|
||||
# Add comparison link if we have a latest stable release
|
||||
if [ -n "$LATEST_STABLE_RELEASE" ]; then
|
||||
cat >> changelog.md <<-EOF
|
||||
|
||||
$CHANGELOG
|
||||
## 📋 What's Changed
|
||||
|
||||
See all changes since the latest release: [Compare $LATEST_STABLE_RELEASE...HEAD](https://github.com/${{ github.repository }}/compare/$LATEST_STABLE_RELEASE...HEAD)
|
||||
EOF
|
||||
else
|
||||
cat >> changelog.md <<-EOF
|
||||
|
||||
## 📋 What's Changed
|
||||
|
||||
See all changes: [View commits](https://github.com/${{ github.repository }}/commits/develop)
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Add build metadata
|
||||
cat >> changelog.md <<-EOF
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue