debug workflow

This commit is contained in:
softprops 2019-09-09 18:42:19 +09:00
parent e60d11aee8
commit 7ab8811117
2 changed files with 9 additions and 8 deletions

View File

@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
}); });
}; };
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@actions/core");
const github_1 = require("@actions/github");
const util_1 = require("./util"); const util_1 = require("./util");
const github_2 = require("./github"); const github_1 = require("./github");
const core_1 = require("@actions/core");
const github_2 = require("@actions/github");
function run() { function run() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -20,11 +20,11 @@ function run() {
if (!util_1.isTag(config.github_ref)) { if (!util_1.isTag(config.github_ref)) {
throw new Error(`⚠️ GitHub Releases requires a tag`); throw new Error(`⚠️ GitHub Releases requires a tag`);
} }
const gh = new github_1.GitHub(config.github_token); const gh = new github_2.GitHub(config.github_token);
let rel = yield github_2.release(config, gh); let rel = yield github_1.release(config, gh);
if (config.input_files) { if (config.input_files) {
util_1.paths(config.input_files).forEach((path) => __awaiter(this, void 0, void 0, function* () { util_1.paths(config.input_files).forEach((path) => __awaiter(this, void 0, void 0, function* () {
yield github_2.upload(gh, rel.upload_url, path); yield github_1.upload(gh, rel.upload_url, path);
})); }));
} }
console.log(`🎉 Release ready at ${rel.html_url}`); console.log(`🎉 Release ready at ${rel.html_url}`);

View File

@ -1,7 +1,8 @@
import { setFailed } from '@actions/core';
import { GitHub } from '@actions/github';
import { paths, parseConfig, isTag } from './util'; import { paths, parseConfig, isTag } from './util';
import { release, upload } from './github'; import { release, upload } from './github';
import { setFailed } from '@actions/core';
import { GitHub } from '@actions/github';
async function run() { async function run() {
try { try {