Skip to content

Commit 7f6d1d9

Browse files
committed
ci: support optional release description from verdesc file
1 parent d705d7c commit 7f6d1d9

1 file changed

Lines changed: 25 additions & 9 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,20 +215,36 @@ jobs:
215215
done
216216
echo "EOF" >> $GITHUB_OUTPUT
217217
218+
- name: Prepare release body
219+
id: body
220+
shell: bash
221+
run: |
222+
BODY_FILE="/tmp/release_body.md"
223+
> "$BODY_FILE"
224+
if [ -f verdesc ] && [ -s verdesc ]; then
225+
cat verdesc >> "$BODY_FILE"
226+
echo "" >> "$BODY_FILE"
227+
echo "---" >> "$BODY_FILE"
228+
echo "" >> "$BODY_FILE"
229+
fi
230+
{
231+
echo "${{ steps.version.outputs.release_banner }}"
232+
echo "${{ steps.version.outputs.release_notice }}"
233+
echo "### Build Information"
234+
echo "- Version: ${{ steps.version.outputs.version }}"
235+
echo "- Commit: ${{ github.sha }}"
236+
echo "- Branch: ${{ github.ref_name }}"
237+
echo "- Built: ${{ github.event.head_commit.timestamp }}"
238+
echo "${{ steps.changelog.outputs.changelog }}"
239+
} >> "$BODY_FILE"
240+
echo "path=$BODY_FILE" >> $GITHUB_OUTPUT
241+
218242
- name: Create Release
219243
uses: softprops/action-gh-release@v2
220244
with:
221245
tag_name: ${{ steps.version.outputs.version }}
222246
name: ${{ steps.version.outputs.version }}
223-
body: |
224-
${{ steps.version.outputs.release_banner }}
225-
${{ steps.version.outputs.release_notice }}
226-
### Build Information
227-
- Version: ${{ steps.version.outputs.version }}
228-
- Commit: ${{ github.sha }}
229-
- Branch: ${{ github.ref_name }}
230-
- Built: ${{ github.event.head_commit.timestamp }}
231-
${{ steps.changelog.outputs.changelog }}
247+
body_path: ${{ steps.body.outputs.path }}
232248
files: |
233249
artifacts/*/*.zip
234250
draft: false

0 commit comments

Comments
 (0)