Adding Job Summary support to my GitHub Release Notes Action
A recent addition to GitHub Actions is the ability to create a custom job summary. Using a simple echo command in a script you can write to the job summary
1steps: - name: Adding markdown 2 run: echo '### Hello world! :rocket:' >> $GITHUB\_STEP\_SUMMARY
Now, this got me thinking. I have a well-used custom release notes extension for Azure DevOps. It has a GitHub Action equivalent, but it does not seem to get as much usage. Would adding support for custom Job Summaries make it more useful?
Well, there was only one way to find out, I added it.
There is now an extra boolean parameter for the action
writeToJobSummary. If this is set to
true (default is
false) the output of the release notes action is written as a custom job summary (as well as still being available as a markdown file as before).
So now using this feature you see something similar to the following. The summary is built using a Handlbars based template.
I hope people find this a useful means to format their release notes using handlebars as opposed to having to build them using a series of
echo statements in a script or writing their own custom action.