debug logging

This commit is contained in:
softprops 2019-09-09 20:36:51 +09:00
parent d644a384fb
commit cf2aed3a12
4 changed files with 6 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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);
}
});

View file

@ -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;
}
}

View file

@ -20,6 +20,7 @@ async function run() {
}
console.log(`🎉 Release ready at ${rel.html_url}`)
} catch (error) {
console.log(`Error: ${error}`);
setFailed(error.message);
}
}