@@ -134,30 +134,30 @@ jobs:
134134 current="${tags[$i]}"
135135 next="${tags[$((i+1))]}"
136136
137- # Skip if current is empty (e.g., i == len)
138- if [ -z "$current" ]; then
139- continue
140- fi
141-
142- if [ -n "$next" ]; then
143- commits=$(git --no-pager log --format="%s (%an) [%h]" "${next}..${current}")
144- else
145- # last tag (oldest), no previous one
146- commits=$(git --no-pager log --format="%s (%an) [%h]" "${current}")
147- fi
148-
149- if [ -n "$commits" ]; then
150- tag_log="### ${current}\n"
151- while IFS= read -r commit; do
152- tag_log+="- ${commit}\n"
153- done <<< "$commits"
154- changelog="${changelog}\n${tag_log}"
155- fi
156- done
157-
158- changelog="# Changelog\n${changelog}"
159- echo -e "$changelog"
160- printf '%b' "$changelog" > CHANGELOG.md
137+ # Skip if current is empty (e.g., i == len)
138+ if [ -z "$current" ]; then
139+ continue
140+ fi
141+
142+ if [ -n "$next" ]; then
143+ commits=$(git --no-pager log --format="%s (%an) [%h]" "${next}..${current}")
144+ else
145+ # last tag (oldest), no previous one
146+ commits=$(git --no-pager log --format="%s (%an) [%h]" "${current}")
147+ fi
148+
149+ if [ -n "$commits" ]; then
150+ tag_log="### ${current}\n"
151+ while IFS= read -r commit; do
152+ tag_log+="- ${commit}\n"
153+ done <<< "$commits"
154+ changelog="${changelog}\n${tag_log}"
155+ fi
156+ done
157+
158+ changelog="# Changelog\n${changelog}"
159+ echo -e "$changelog"
160+ printf '%b' "$changelog" > CHANGELOG.md
161161 - name : Upload new changelog
162162 uses : actions/upload-artifact@v4
163163 with :
0 commit comments