Skip to content

Commit c4d1575

Browse files
authored
ci: more robust changelog extraction (#178)
Handle content beginning on same line as change-notes tag.
1 parent 3a93207 commit c4d1575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
echo RELEASE_TAG=$(awk '/pluginVersion/ { print $3 }' gradle.properties) >> $GITHUB_OUTPUT
3232
echo "TODAY_DATE=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT
33-
echo "CHANGE_LOG=$(awk '/<change-notes>/ { a=1; next } a==1 && /^</ { a=2 } a==2 { if (/<\/change-notes>/) x=1; gsub(/^[ \t]+|\]\].*/, ""); gsub(/[\"\`]/, "\\&"); ORS=" "; print; if (x==1) exit }' src/main/resources/META-INF/plugin.xml)" >> $GITHUB_OUTPUT
33+
echo "CHANGE_LOG=$(awk '/<change-notes>/ { a=1; gsub(/<change-notes>[ \t]*<!\[CDATA\[[ \t]*/, ""); } a==1 && /</ { a=2 } a==2 { if (/<\/change-notes>/) x=1; gsub(/^[ \t]+|\]\].*/, ""); gsub(/[\"\`]/, "\\&"); ORS=" "; print; if (x==1) exit }' src/main/resources/META-INF/plugin.xml)" >> $GITHUB_OUTPUT
3434
3535
- run: |
3636
echo "${{ steps.setenv.outputs.RELEASE_TAG }}"

0 commit comments

Comments
 (0)