fmt
This commit is contained in:
parent
2b68b29aae
commit
fdb5f68261
1 changed files with 8 additions and 8 deletions
|
@ -116,7 +116,7 @@ export const asset = (path: string): ReleaseAsset => {
|
||||||
name: basename(path),
|
name: basename(path),
|
||||||
mime: mimeOrDefault(path),
|
mime: mimeOrDefault(path),
|
||||||
size: lstatSync(path).size,
|
size: lstatSync(path).size,
|
||||||
file: readFileSync(path),
|
file: readFileSync(path)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -135,10 +135,10 @@ export const upload = async (
|
||||||
url,
|
url,
|
||||||
headers: {
|
headers: {
|
||||||
"content-length": size,
|
"content-length": size,
|
||||||
"content-type": mime,
|
"content-type": mime
|
||||||
},
|
},
|
||||||
name,
|
name,
|
||||||
file,
|
file
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -164,9 +164,9 @@ export const release = async (
|
||||||
if (config.input_draft) {
|
if (config.input_draft) {
|
||||||
for await (const response of releaser.allReleases({
|
for await (const response of releaser.allReleases({
|
||||||
owner,
|
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) {
|
if (release) {
|
||||||
return release;
|
return release;
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ export const release = async (
|
||||||
let existingRelease = await releaser.getReleaseByTag({
|
let existingRelease = await releaser.getReleaseByTag({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
tag,
|
tag
|
||||||
});
|
});
|
||||||
|
|
||||||
const release_id = existingRelease.data.id;
|
const release_id = existingRelease.data.id;
|
||||||
|
@ -219,7 +219,7 @@ export const release = async (
|
||||||
name,
|
name,
|
||||||
body,
|
body,
|
||||||
draft,
|
draft,
|
||||||
prerelease,
|
prerelease
|
||||||
});
|
});
|
||||||
return release.data;
|
return release.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -246,7 +246,7 @@ export const release = async (
|
||||||
body,
|
body,
|
||||||
draft,
|
draft,
|
||||||
prerelease,
|
prerelease,
|
||||||
target_commitish,
|
target_commitish
|
||||||
});
|
});
|
||||||
return release.data;
|
return release.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in a new issue