Skip to content

Commit

Permalink
fix value of make_latest option when creating release
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Nov 21, 2023
1 parent c46240f commit 7984145
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gulp.d/tasks/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ module.exports = (dest, bundleName, owner, repo, ref, token, updateBranch, lates
() => undefined
)
}
const tags = latestTagName ? [tagName, latestTagName] : [tagName]
for (const tag of tags) {
for (const tag of latestTagName ? [tagName, latestTagName] : [tagName]) {
if (tag !== tagName) await new Promise((resolve) => setTimeout(resolve, 1000))
const isLatest = tag === tagName ? 'true' : 'false'
const uploadUrl = await octokit.repos
.createRelease({ owner, repo, tag_name: tag, target_commitish: commit, name: tag, make_latest: tag === tagName })
.createRelease({ owner, repo, tag_name: tag, target_commitish: commit, name: tag, make_latest: isLatest })
.then((result) => result.data.upload_url)
await octokit.repos.uploadReleaseAsset({
url: uploadUrl,
Expand Down

0 comments on commit 7984145

Please sign in to comment.