File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -128,15 +128,35 @@ jobs:
128
128
129
129
release :
130
130
needs : [ version, push ]
131
- if : needs.version.outputs.releasable == 'true'
132
131
runs-on : ubuntu-latest
133
132
permissions :
134
133
contents : write
135
134
steps :
136
135
- uses : actions/checkout@v3
136
+ - name : Generate release description
137
+ run : |
138
+ log_content() {
139
+ local content="$1"
140
+ local label="${2:-}"
141
+
142
+ if [[ -n "$label" ]]; then
143
+ # Replace the beginning of each line with two spaces
144
+ local indented_content="${content//$'\n'/$'\n' }"
145
+ printf "%s:\n %s\n" "$label" "$indented_content"
146
+ else
147
+ echo "$content"
148
+ fi
149
+ }
150
+ CHANGELOG_URL="https://github.com/${{ github.event.repository.full_name }}/compare/${{ needs.version.outputs.previous-release-tag }}...v${{ needs.version.outputs.semver }}"
151
+ echo "BODY=**Full Changelog**: $CHANGELOG_URL" >> $GITHUB_ENV
152
+ echo ::group::Set outputs
153
+ log_content "$(cat "$GITHUB_ENV")" "GITHUB_ENV"
154
+ echo ::endgroup::
155
+
137
156
- uses : softprops/action-gh-release@v1
157
+ if : needs.version.outputs.releasable == 'true'
138
158
with :
139
- body : " **Full Changelog**: https://github.com/ ${{ github.event.repository.full_name }}/compare/${{ needs.version.outputs.previous-release-tag }}...v${{ needs.version.outputs.semver }} "
159
+ body : ${{ env.BODY }}
140
160
generate_release_notes : true
141
161
tag_name : v${{ needs.version.outputs.semver }}
142
162
token : ${{ secrets.PAT }} # using our own PAT so other workflows run
You can’t perform that action at this time.
0 commit comments