add append_body option

This commit is contained in:
Feng Yu 2022-01-22 12:07:19 +08:00
parent 8a65c81355
commit 030d4cef8f
No known key found for this signature in database
GPG key ID: D57121CAD3189591
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