utilize formatted upload url

This commit is contained in:
softprops 2021-08-07 23:31:49 -04:00
parent 3c2ce6b9bd
commit 935aebbf1d
2 changed files with 11 additions and 5 deletions

4
dist/index.js vendored
View file

@ -2139,14 +2139,14 @@ function run() {
}
});
//);
let rel = yield github_1.release(config, new github_1.GitHubReleaser(gh));
const rel = yield github_1.release(config, new github_1.GitHubReleaser(gh));
if (config.input_files) {
const files = util_1.paths(config.input_files);
if (files.length == 0) {
console.warn(`🤔 ${config.input_files} not include valid file.`);
}
yield Promise.all(files.map((path) => __awaiter(this, void 0, void 0, function* () {
yield github_1.upload(gh, rel.upload_url, path);
yield github_1.upload(gh, util_1.uploadUrl(rel.upload_url), path);
}))).catch(error => {
throw error;
});