This commit is contained in:
softprops 2021-12-05 23:25:22 -05:00
parent 040bca2f2d
commit f20f71e9fd

View File

@ -3,7 +3,7 @@ import {
parseConfig, parseConfig,
isTag, isTag,
unmatchedPatterns, unmatchedPatterns,
uploadUrl, uploadUrl
} from "./util"; } from "./util";
import { release, upload, GitHubReleaser } from "./github"; import { release, upload, GitHubReleaser } from "./github";
import { Octokit } from "@octokit/action"; import { Octokit } from "@octokit/action";
@ -24,7 +24,7 @@ async function run() {
} }
if (config.input_files) { if (config.input_files) {
const patterns = unmatchedPatterns(config.input_files); const patterns = unmatchedPatterns(config.input_files);
patterns.forEach((pattern) => patterns.forEach(pattern =>
console.warn(`🤔 Pattern '${pattern}' does not match any files.`) console.warn(`🤔 Pattern '${pattern}' does not match any files.`)
); );
if (patterns.length > 0 && config.input_fail_on_unmatched_files) { if (patterns.length > 0 && config.input_fail_on_unmatched_files) {
@ -51,8 +51,8 @@ async function run() {
console.warn( console.warn(
`Abuse detected for request ${options.method} ${options.url}` `Abuse detected for request ${options.method} ${options.url}`
); );
}, }
}, }
}); });
//); //);
const rel = await release(config, new GitHubReleaser(gh)); const rel = await release(config, new GitHubReleaser(gh));
@ -63,7 +63,7 @@ async function run() {
} }
const currentAssets = rel.assets; const currentAssets = rel.assets;
const assets = await Promise.all( const assets = await Promise.all(
files.map(async (path) => { files.map(async path => {
const json = await upload( const json = await upload(
config, config,
gh, gh,
@ -74,7 +74,7 @@ async function run() {
delete json.uploader; delete json.uploader;
return json; return json;
}) })
).catch((error) => { ).catch(error => {
throw error; throw error;
}); });
setOutput("assets", assets); setOutput("assets", assets);