Skip to content

Commit c32410c

Browse files
committed
Improve workflows: release notes & Java setup
Fix Java matrix step naming/casing (use matrix.java and update step label) and tidy branch formatting in maven-build.yml. Enhance maven-publish.yml release notes: expand requested sections in the AI prompt, append a Full Changelog compare URL to the repository notes and temp release file, ensure spacing/newlines, and adjust gh release checks/titles to use the raw input revision (avoid duplicating the 'v' prefix). Minor formatting tweaks.
1 parent 0e27f62 commit c32410c

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/workflows/maven-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
push:
1616
branches: [ 'main' , 'dev' ]
1717
pull_request:
18-
branches: [ 'main', 'dev' , 'release' ]
18+
branches: [ 'main' , 'dev' , 'release' ]
1919

2020
jobs:
2121
build:
@@ -27,7 +27,7 @@ jobs:
2727
- name: Checkout Source
2828
uses: actions/checkout@v5
2929

30-
- name: Setup JDK ${{ matrix.Java }}
30+
- name: Setup Java ${{ matrix.java }}
3131
uses: actions/setup-java@v5
3232
with:
3333
distribution: 'temurin'

.github/workflows/maven-publish.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ jobs:
119119
prompt = (
120120
f"Generate concise release notes for version {current_tag}.\n\n"
121121
f"Commits since {prev_tag}:\n{commits}\n\n"
122-
"Format the output as markdown with sections for New Features, Bug Fixes, "
123-
"and Other Changes (only include sections that have relevant commits). "
122+
"Format the output as markdown with sections if present for New Features, Bug Fixes, "
123+
"Documentations, Dependency Updates, Test Improvements, Build and Workflow Enhancements "
124+
"and Other Changes(excludes Full Changelog).\n\n"
124125
"Be concise and clear."
125126
)
126127
@@ -153,20 +154,25 @@ jobs:
153154
if [ ! -f "$NOTES_FILE" ]; then
154155
printf "# Release Notes\n\n" > "$NOTES_FILE"
155156
fi
157+
158+
FULL_CHANGELOG="**Full Changelog**: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$PREV_TAG...$CURRENT_TAG"
159+
156160
printf "## v%s\n\n%s\n\n" "$CURRENT_TAG" "$SUMMARY" >> "$NOTES_FILE"
157-
161+
printf "%s" "$FULL_CHANGELOG" >> "$NOTES_FILE"
162+
158163
# Write the current release notes to a temp file for the Create Release step
159-
printf "%s" "$SUMMARY" > /tmp/current-release-notes.md
164+
printf "%s\n\n" "$SUMMARY" > /tmp/current-release-notes.md
165+
printf "%s" "$FULL_CHANGELOG" >> /tmp/current-release-notes.md
160166
161167
echo "Release notes generated and appended to $NOTES_FILE"
162168
163169
- name: Create Release
164170
run: |
165-
if gh release view "v${{ inputs.revision }}" >/dev/null 2>&1; then
166-
echo "Release v${{ inputs.revision }} already exists, skipping."
171+
if gh release view "${{ inputs.revision }}" >/dev/null 2>&1; then
172+
echo "Release ${{ inputs.revision }} already exists, skipping."
167173
else
168174
gh release create ${{ inputs.revision }} \
169-
--title "v${{ inputs.revision }}" \
175+
--title "${{ inputs.revision }}" \
170176
--notes-file /tmp/current-release-notes.md \
171177
--latest
172178
fi

0 commit comments

Comments
 (0)