This repository was archived by the owner on May 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,35 @@ jobs:
39
39
env :
40
40
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
41
42
+ # Extract the latest changelog section
43
+ # Pulls everything after the first version header like "= 8.1.0 - ... =" until the next "=" section header or end of file
44
+ - name : Extract latest changelog section
45
+ id : changelog
46
+ run : |
47
+ version_line_found=0
48
+ echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
49
+ while IFS= read -r line; do
50
+ if [[ $line == =\ *\ = ]]; then
51
+ if [[ $version_line_found -eq 1 ]]; then
52
+ break
53
+ else
54
+ version_line_found=1
55
+ echo "$line" >> $GITHUB_OUTPUT
56
+ fi
57
+ elif [[ $version_line_found -eq 1 ]]; then
58
+ echo "$line" >> $GITHUB_OUTPUT
59
+ fi
60
+ done < changelog.txt
61
+ echo "EOF" >> $GITHUB_OUTPUT
62
+
42
63
- name : Create or Update GitHub Release
43
64
uses : softprops/action-gh-release@v2
44
65
with :
45
66
tag_name : Nightly
46
67
release_name : " Nightly Build"
47
68
prerelease : true
48
69
draft : false
70
+ body : ${{ steps.changelog.outputs.CHANGELOG }}
49
71
files : woocommerce-subscriptions-core.zip
50
72
env :
51
73
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments