From f26a08096ab66fd98c2fb14d88873527ba637d40 Mon Sep 17 00:00:00 2001 From: softprops Date: Sun, 29 Sep 2019 08:16:42 -0400 Subject: [PATCH] commit latest build artifacts --- lib/github.js | 3 ++- lib/util.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/github.js b/lib/github.js index d83ef87..2a6de02 100644 --- a/lib/github.js +++ b/lib/github.js @@ -16,6 +16,7 @@ var __asyncValues = (this && this.__asyncValues) || function (o) { function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } }; Object.defineProperty(exports, "__esModule", { value: true }); +const util_1 = require("./util"); const fs_1 = require("fs"); const mime_1 = require("mime"); const path_1 = require("path"); @@ -98,7 +99,7 @@ exports.release = (config, releaser) => __awaiter(void 0, void 0, void 0, functi try { const tag_name = tag; const name = config.input_name || tag; - const body = config.input_body; + const body = util_1.releaseBody(config); const draft = config.input_draft; const prerelease = config.input_prerelease; console.log(`👩‍🏭 Creating new GitHub release for tag ${tag_name}...`); diff --git a/lib/util.js b/lib/util.js index e71e322..40deda2 100644 --- a/lib/util.js +++ b/lib/util.js @@ -9,6 +9,11 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); const glob = __importStar(require("glob")); const fs_1 = require("fs"); +exports.releaseBody = (config) => { + return (config.input_body || + (config.input_body_path && + fs_1.readFileSync(config.input_body_path).toString("utf8"))); +}; exports.parseInputFiles = (files) => { return files.split(/\r?\n/).reduce((acc, line) => acc .concat(line.split(","))