Only catch github API error (#32)

* move assignements out of try block

* include compiled code
This commit is contained in:
Loïc Paulevé authored and Doug Tangren committed 2019-12-10 08:49:37 -05:00
1 parent 37ae175992
commit d651ef48cb
2 files changed
+12 -12

No files matched your search

+6 -6
View File
@@ -97,13 +97,13 @@ exports.release = (config, releaser) => __awaiter(void 0, void 0, void 0, functi
}
catch (error) {
if (error.status === 404) {
const tag_name = tag;
const name = config.input_name || tag;
const body = util_1.releaseBody(config);
const draft = config.input_draft;
const prerelease = config.input_prerelease;
console.log(`👩‍🏭 Creating new GitHub release for tag ${tag_name}...`);
try {
const tag_name = tag;
const name = config.input_name || tag;
const body = util_1.releaseBody(config);
const draft = config.input_draft;
const prerelease = config.input_prerelease;
console.log(`👩‍🏭 Creating new GitHub release for tag ${tag_name}...`);
let release = yield releaser.createRelease({
owner,
repo,