This commit is contained in:
softprops 2019-09-09 21:20:59 +09:00
parent 624fcca9a1
commit ef96a2eb52
7 changed files with 158 additions and 102 deletions

View file

@ -1,9 +1,8 @@
import { paths, parseConfig, isTag } from './util';
import { release, upload } from './github';
import { setFailed } from '@actions/core';
import { GitHub } from '@actions/github';
import { env } from 'process';
import { paths, parseConfig, isTag } from "./util";
import { release, upload } from "./github";
import { setFailed } from "@actions/core";
import { GitHub } from "@actions/github";
import { env } from "process";
async function run() {
try {
@ -14,15 +13,15 @@ async function run() {
const gh = new GitHub(config.github_token);
let rel = await release(config, gh);
if (config.input_files) {
paths(config.input_files).forEach(async (path) => {
await upload(gh, rel.upload_url, path)
paths(config.input_files).forEach(async path => {
await upload(gh, rel.upload_url, path);
});
}
console.log(`🎉 Release ready at ${rel.html_url}`)
console.log(`🎉 Release ready at ${rel.html_url}`);
} catch (error) {
console.log(`Error: ${error}`);
setFailed(error.message);
}
}
run();
run();