build: ignore makeLatest on pre-releases (#37274)
* build: ignore makeLatest on pre-releases * chore: set makeLatest to false by default Co-authored-by: Samuel Attard <sam@electronjs.org> --------- Co-authored-by: Samuel Attard <sam@electronjs.org>
This commit is contained in:
parent
d0cf9c4b08
commit
17ea7f42fc
1 changed files with 8 additions and 5 deletions
|
@ -318,12 +318,15 @@ function saveShaSumFile (checksums, fileName) {
|
|||
}
|
||||
|
||||
async function publishRelease (release) {
|
||||
const currentLatest = await octokit.repos.getLatestRelease({
|
||||
owner: 'electron',
|
||||
repo: targetRepo
|
||||
});
|
||||
let makeLatest = false;
|
||||
if (!release.prerelease) {
|
||||
const currentLatest = await octokit.repos.getLatestRelease({
|
||||
owner: 'electron',
|
||||
repo: targetRepo
|
||||
});
|
||||
|
||||
const makeLatest = !release.prerelease && semver.gte(release.tag_name, currentLatest.data.tag_name);
|
||||
makeLatest = semver.gte(release.tag_name, currentLatest.data.tag_name);
|
||||
}
|
||||
|
||||
return octokit.repos.updateRelease({
|
||||
owner: 'electron',
|
||||
|
|
Loading…
Reference in a new issue