fix(ci): fix changelog layout

This commit is contained in:
Luke Tainton 2025-01-01 04:10:45 +00:00
parent 9f5f573270
commit 4e24815792
Signed by: luke
SSH Key Fingerprint: SHA256:D34npKT7UaiT/7gULqu7EPSLWWVAjTjXf4kKfJ/fQBo

View File

@ -61,16 +61,19 @@ jobs:
- name: Changes since last tag - name: Changes since last tag
id: changes id: changes
run: | run: |
rm -f .changes .changes_feat .changes_fix .changes_dep .changes_other
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline >> .changes git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline >> .changes
cat ".changes" cat .changes
if [[ -z $(grep '[^[:space:]]' .changes) ]] ; then if [[ -z $(grep '[^[:space:]]' .changes) ]] ; then
echo "changes=false"
echo "changes=false" >> "$GITEA_OUTPUT" echo "changes=false" >> "$GITEA_OUTPUT"
else else
echo "changes=true"
echo "changes=true" >> "$GITEA_OUTPUT" echo "changes=true" >> "$GITEA_OUTPUT"
grep -n "feat" .changes > .changes_feat grep -i "feat" .changes >> .changes_feat
grep -n "fix" .changes > .changes_fix grep -i "fix" .changes >> .changes_fix
grep -n "dependencies" .changes > .changes_dep grep -i "dependencies" .changes >> .changes_dep
grep -n "other" .changes > .changes_other grep -i "other" .changes >> .changes_other
fi fi
- name: Cancel if no changes - name: Cancel if no changes
@ -81,6 +84,7 @@ jobs:
id: create_changelog id: create_changelog
if: steps.changes.outputs.changes == 'true' if: steps.changes.outputs.changes == 'true'
run: | run: |
rm -f .changelog
if [[ -z $(grep '[^[:space:]]' .changes_feat) ]] ; then if [[ -z $(grep '[^[:space:]]' .changes_feat) ]] ; then
printf "## 🚀 Features" > .changelog printf "## 🚀 Features" > .changelog
cat .changes_feat >> .changelog cat .changes_feat >> .changelog