From cf2aed3a126f3f3568cb437df9d095435726356a Mon Sep 17 00:00:00 2001 From: softprops Date: Mon, 9 Sep 2019 20:36:51 +0900 Subject: [PATCH] debug logging --- lib/github.js | 2 ++ lib/main.js | 1 + src/github.ts | 2 ++ src/main.ts | 1 + 4 files changed, 6 insertions(+) diff --git a/lib/github.js b/lib/github.js index 5147427..614f7bf 100644 --- a/lib/github.js +++ b/lib/github.js @@ -48,6 +48,7 @@ exports.release = (config, gh) => __awaiter(void 0, void 0, void 0, function* () } catch (error) { if (error.status === 404) { + console.log("Creating new release..."); const tag_name = config.github_ref.replace("refs/tags/", ""); const name = config.input_name || tag_name; const body = config.input_body; @@ -63,6 +64,7 @@ exports.release = (config, gh) => __awaiter(void 0, void 0, void 0, function* () return release.data; } else { + console.log(`Unexpected error fetching github release for tag ${config.github_ref}: ${error}`); throw error; } } diff --git a/lib/main.js b/lib/main.js index cd98f3c..ed43d6e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -31,6 +31,7 @@ function run() { console.log(`🎉 Release ready at ${rel.html_url}`); } catch (error) { + console.log(`Error: ${error}`); core_1.setFailed(error.message); } }); diff --git a/src/github.ts b/src/github.ts index 9bb7591..2bb9e1f 100644 --- a/src/github.ts +++ b/src/github.ts @@ -66,6 +66,7 @@ export const release = async ( return release.data; } catch (error) { if (error.status === 404) { + console.log("Creating new release..."); const tag_name = config.github_ref.replace("refs/tags/", ""); const name = config.input_name || tag_name; const body = config.input_body; @@ -80,6 +81,7 @@ export const release = async ( }); return release.data; } else { + console.log(`Unexpected error fetching github release for tag ${config.github_ref}: ${error}`); throw error; } } diff --git a/src/main.ts b/src/main.ts index 558e421..f597e48 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,6 +20,7 @@ async function run() { } console.log(`🎉 Release ready at ${rel.html_url}`) } catch (error) { + console.log(`Error: ${error}`); setFailed(error.message); } }