File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,18 @@ inputs:
2727 description : ' Prepend the generated changelog to the output file instead of overwriting it'
2828 required : false
2929 default : ' true'
30+ summary :
31+ description : ' Append the generated changelog to the GitHub step summary'
32+ required : false
33+ default : ' true'
34+ artifact :
35+ description : ' Upload the generated changelog as a workflow artifact'
36+ required : false
37+ default : ' true'
38+ artifact-name :
39+ description : ' Name of the changelog artifact'
40+ required : false
41+ default : ' release-changelog'
3042outputs :
3143 content :
3244 description : ' The generated changelog content'
4860 ${{ inputs.args }}
4961 github_token : ${{ inputs.token || github.token }}
5062
63+ - name : add changelog to step summary
64+ if : inputs.summary == 'true'
65+ shell : bash
66+ env :
67+ CHANGELOG_OUTPUT : ${{ inputs.prepend == 'true' && '/tmp/cliff-changelog.md' || inputs.output }}
68+ run : |
69+ set -euo pipefail
70+ {
71+ echo "## Release changelog"
72+ echo
73+ cat "${CHANGELOG_OUTPUT}"
74+ } >> "${GITHUB_STEP_SUMMARY}"
75+
76+ - name : upload changelog artifact
77+ if : inputs.artifact == 'true'
78+ uses : eviden-actions/upload-artifact@v2
79+ with :
80+ name : ${{ inputs.artifact-name }}
81+ path : ${{ inputs.prepend == 'true' && '/tmp/cliff-changelog.md' || inputs.output }}
82+ if-no-files-found : error
83+
5184 - name : add changelog to git staging
5285 shell : bash
5386 run : |
You can’t perform that action at this time.
0 commit comments