Skip to content

Commit 9b2e89d

Browse files
committed
Move GitHub Summary to it's own step and add additional info to it
1 parent 87458ea commit 9b2e89d

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/github-release.yml

+21-5
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,35 @@ jobs:
109109
echo "release_tag=$release_tag" >> $GITHUB_OUTPUT
110110
111111
- name: Update Release Description
112+
id: update_release_description
112113
env:
113114
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114115
RELEASE_TAG: ${{ steps.create_release.outputs.release_tag }}
115116
ARTIFACT_RUN_ID: ${{ inputs.artifact-run-id }}
116117
run: |
117-
# Get current release body
118+
# Add builds source to the end of the release description
118119
current_body=$(gh release view $RELEASE_TAG --json body --jq .body)
119-
# Append build source to the end
120120
updated_body="${current_body}
121121
**Builds Source:** https://github.com/${{ github.repository }}/actions/runs/$ARTIFACT_RUN_ID"
122-
123-
# Update release
124122
new_url=$(gh release edit $RELEASE_TAG --notes "$updated_body")
125123
124+
# draft release links change after editing
125+
echo "release_url=$new_url" >> $GITHUB_OUTPUT
126+
127+
- name: Add Release Summary
128+
env:
129+
RELEASE_TAG: ${{ steps.create_release.outputs.release_tag }}
130+
RELEASE_BRANCH: ${{ steps.get_release_branch.outputs.release_branch }}
131+
LAST_RELEASE_TAG: ${{ steps.get_last_tag.outputs.last_release_tag }}
132+
RELEASE_URL: ${{ steps.update_release_description.outputs.release_url }}
133+
run: |
126134
echo "# :fish_cake: Release ready at:" >> $GITHUB_STEP_SUMMARY
127-
echo "$new_url" >> $GITHUB_STEP_SUMMARY
135+
echo "$RELEASE_URL" >> $GITHUB_STEP_SUMMARY
136+
echo "" >> $GITHUB_STEP_SUMMARY
137+
echo "Confirm that the defined GitHub Release options are correct:" >> $GITHUB_STEP_SUMMARY
138+
echo " * New tag name: $RELEASE_TAG" >> $GITHUB_STEP_SUMMARY
139+
echo " * Target branch: $RELEASE_BRANCH" >> $GITHUB_STEP_SUMMARY
140+
echo " * Previous tag set in the description \"Full Changelog\" link: $LAST_RELEASE_TAG" >> $GITHUB_STEP_SUMMARY
141+
echo " * Description has automated release notes and they match the commits in the release branch" >> $GITHUB_STEP_SUMMARY
142+
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
143+
echo "> Commits directly pushed to branches without a Pull Request won't appear in the automated release notes." >> $GITHUB_SUMMARY

0 commit comments

Comments
 (0)