add append_body option (#199)

This commit is contained in:
Feng Yu 2022-01-23 00:40:31 +08:00 committed by GitHub
parent 8a65c81355
commit fe9a9bd329
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 53 additions and 9 deletions

View file

@ -238,7 +238,14 @@ export const release = async (
// body parts as a release gets updated. some users will likely want this while
// others won't previously this was duplicating content for most which
// no one wants
let body = releaseBody(config) || existingRelease.data.body || "";
const workflowBody = releaseBody(config) || "";
const existingReleaseBody = existingRelease.data.body || "";
let body: string;
if (config.input_append_body && workflowBody && existingReleaseBody) {
body = existingReleaseBody + "\n" + workflowBody;
} else {
body = workflowBody || existingReleaseBody;
}
const draft =
config.input_draft !== undefined