update workflow to correct errors

This commit is contained in:
2025-07-07 06:16:13 -07:00
parent e042963df3
commit ae0f31d36e

View File

@@ -121,14 +121,19 @@ jobs:
changelog="${{ matrix.version }}/CHANGES.md"
mkdir -p "$(dirname "$changelog")"
touch "$changelog"
infofile="${{ matrix.version }}/build-info.json"
last_commit=""
[ -f "$infofile" ] && last_commit=$(jq -r '.commit' "$infofile")
if [ -f "$infofile" ]; then
last_commit=$(jq -r '.commit' "$infofile")
fi
echo -e "\n## $(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$changelog"
if [ -n "$last_commit" ]; then
git log "${last_commit}..HEAD" --pretty=format:"- %s (%an)" | head -n 10 >> "$changelog"
else
git log -n 10 --pretty=format:"- %s (%an)" >> "$changelog"
fi
- name: Commit and push changelog
run: |