Skip to content

Commit 8bf5cf2

Browse files
committed
Enhance release notes and release creation
Update maven-publish workflow: expand the AI prompt to include additional sections (Documentations, Dependency Updates, Test Improvements, Build and Workflow Enhancements), add a Full Changelog compare link and append it to the repository NOTES_FILE and the temporary current-release-notes.md, and adjust newline formatting when writing the temp file. Also normalize gh release view/create usage to rely on inputs.revision as-provided (remove forced "v" prefix) to avoid duplicate checks and incorrect titles.
1 parent b56c369 commit 8bf5cf2

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/maven-publish.yml

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

0 commit comments

Comments
 (0)