Skip to content

Commit 62d7bbe

Browse files
committed
fix: add validation for empty changelog before release upload
Ensure changelog is not empty before creating RC release to avoid 'size must be greater than or equal to 1' error from GitHub API. Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com> On-behalf-of: Gerald Morrison (SAP) <gerald.morrison@sap.com>
1 parent f07b103 commit 62d7bbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/cli-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ jobs:
114114
contents: write
115115
steps:
116116
- name: Decode changelog to file
117+
env:
118+
CHANGELOG_B64: ${{ needs.prepare.outputs.changelog_b64 }}
117119
run: |
118-
echo "${{ needs.prepare.outputs.changelog_b64 }}" | base64 --decode > "${{ runner.temp }}/CHANGELOG.md"
120+
[ -n "$CHANGELOG_B64" ] && echo "$CHANGELOG_B64" | base64 --decode > "${{ runner.temp }}/CHANGELOG.md" || true
121+
# Ensure file exists and is not empty
122+
[ -s "${{ runner.temp }}/CHANGELOG.md" ] || echo "Release notes not available." > "${{ runner.temp }}/CHANGELOG.md"
119123
120124
- name: Download CLI artifacts
121125
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7

0 commit comments

Comments
 (0)