@@ -132,15 +132,11 @@ jobs:
132
132
exit 0
133
133
;;
134
134
135
- "ERRORED"|"CANCELLED")
136
- if [[ "$BUILD_STATUS" == "canceled" ]]; then
137
- echo "Build was canceled! Details:"
138
- else
139
- echo "Build failed! Error details:"
140
- fi
141
- echo "$BUILD_STATUS_JSON" | jq .
142
- exit 1
143
- ;;
135
+ "ERRORED"|"CANCELLED")
136
+ echo "Build failed! Error details:"
137
+ echo "$BUILD_STATUS_JSON" | jq .
138
+ exit 1
139
+ ;;
144
140
145
141
"NEW"|"IN_QUE"|"IN_PROGRESS"|"PENDING")
146
142
echo "Build is still in progress..."
@@ -186,26 +182,25 @@ jobs:
186
182
- name : Checkout repository
187
183
uses : actions/checkout@v4
188
184
with :
189
- fetch-depth : 0 # Ensures full history is available
185
+ fetch-depth : 0 # Full commit history
190
186
191
187
- name : Generate Changelog
192
188
id : changelog
193
189
run : |
194
190
echo "Generating changelog..."
195
191
196
- # Ensure full history is available
197
- git fetch --prune --unshallow || true
192
+ # Preserved your original git fetch with safety
193
+ git fetch --prune || true
198
194
199
- # Generate changelog and write to file
200
195
CHANGELOG=$(git log --pretty=format:"- %s (%h) by %an" -n 10)
201
196
echo "$CHANGELOG" > changelog.txt
202
197
203
- # Output for debugging
204
198
echo "Changelog content:"
205
199
cat changelog.txt
206
200
207
- # Store in environment variables
201
+ # Critical fix for output formatting
208
202
CHANGELOG_ESCAPED=$(echo "$CHANGELOG" | sed 's/"/\\"/g' | tr -d '\r')
203
+
209
204
echo "CHANGELOG=$CHANGELOG_ESCAPED" >> $GITHUB_OUTPUT
210
205
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
211
206
echo "$CHANGELOG_ESCAPED" >> $GITHUB_ENV
0 commit comments