Skip to content

Commit ebf5d94

Browse files
committed
ci: automatically prepand in release description the latest version's changelog from changelog file
1 parent c0b1dd3 commit ebf5d94

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,20 @@ jobs:
2626
- name: Build fat JAR
2727
run: ./gradlew buildFatJar
2828

29+
- name: Extract changelog
30+
id: changelog
31+
run: |
32+
# Extract the section for the current version (between first and second ## headings)
33+
changelog=$(awk '/^## /{if(found) exit; found=1; next} found{print}' CHANGELOG.md)
34+
# Set as multiline output
35+
echo "body<<EOF" >> "$GITHUB_OUTPUT"
36+
echo "$changelog" >> "$GITHUB_OUTPUT"
37+
echo "EOF" >> "$GITHUB_OUTPUT"
38+
2939
- name: Create Release
3040
uses: softprops/action-gh-release@v2
3141
with:
3242
files: build/libs/tlaplus-formatter.jar
43+
body: ${{ steps.changelog.outputs.body }}
3344
generate_release_notes: true
45+
append_body: true

0 commit comments

Comments
 (0)