Skip to content

Commit

Permalink
Update github.ts (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhalaly authored and softprops committed Jul 26, 2021
1 parent 7cf90a9 commit 350afcd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const asset = (path: string): ReleaseAsset => {
name: basename(path),
mime: mimeOrDefault(path),
size: lstatSync(path).size,
file: readFileSync(path)
file: readFileSync(path),
};
};

Expand All @@ -135,10 +135,10 @@ export const upload = async (
url,
headers: {
"content-length": size,
"content-type": mime
"content-type": mime,
},
name,
file
file,
});
};

Expand All @@ -164,9 +164,9 @@ export const release = async (
if (config.input_draft) {
for await (const response of releaser.allReleases({
owner,
repo
repo,
})) {
let release = response.data.find(release => release.tag_name === tag);
let release = response.data.find((release) => release.tag_name === tag);
if (release) {
return release;
}
Expand All @@ -175,7 +175,7 @@ export const release = async (
let existingRelease = await releaser.getReleaseByTag({
owner,
repo,
tag
tag,
});

const release_id = existingRelease.data.id;
Expand Down Expand Up @@ -219,7 +219,7 @@ export const release = async (
name,
body,
draft,
prerelease
prerelease,
});
return release.data;
} catch (error) {
Expand All @@ -246,7 +246,7 @@ export const release = async (
body,
draft,
prerelease,
target_commitish
target_commitish,
});
return release.data;
} catch (error) {
Expand Down

0 comments on commit 350afcd

Please sign in to comment.