forked from mirrors/action-gh-release
prettier
This commit is contained in:
parent
624fcca9a1
commit
ef96a2eb52
7 changed files with 158 additions and 102 deletions
19
src/main.ts
19
src/main.ts
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue