File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -132,10 +132,18 @@ jobs:
132132 uses : apache/grails-github-actions/post-release@asf
133133 notify-slack :
134134 name : Notify Slack
135- needs : [ publish, release ] # adjust depending on your job names
135+ needs : [ publish, release ]
136136 if : ${{ success() }}
137137 runs-on : ubuntu-latest
138138 steps :
139+ - name : Prepare release body
140+ id : body
141+ run : |
142+ if [ -n "${{ github.event.release.body }}" ]; then
143+ echo "body=${{ github.event.release.body }}" >> $GITHUB_OUTPUT
144+ else
145+ echo "body=No release notes provided." >> $GITHUB_OUTPUT
146+ fi
139147 - name : Send Slack message
140148 uses : slackapi/slack-github-action@v1.27.0
141149 with :
@@ -147,7 +155,9 @@ jobs:
147155 "color": "#36a64f",
148156 "title": "${{ github.event.release.name }}",
149157 "title_link": "${{ github.event.release.html_url }}",
150- "text": "${{ github.event.release.body }}"
158+ "text": ${{
159+ toJson(steps.body.outputs.body)
160+ }}
151161 }
152162 ]
153163 }
You can’t perform that action at this time.
0 commit comments