Skip to content

Commit

Permalink
fix: filter preRelease from lastPublishedReleases
Browse files Browse the repository at this point in the history
  • Loading branch information
Journey committed Jul 1, 2021
1 parent b81f8d8 commit 6cb6a99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ module.exports.findReleases = async ({ ref, context, config }) => {
? releases.filter((r) => ref.match(`/${r.target_commitish}$`))
: releases
const sortedPublishedReleases = sortReleases(
filteredReleases.filter((r) => !r.draft)
filteredReleases.filter((r) => !r.draft && !r.prerelease)
)
const sortedPrePublishedReleases = sortReleases(releases.filter((r) => r.prerelease))
const sortedPrePublishedReleases = sortReleases(filteredReleases.filter((r) => r.prerelease))
const lastPreRelease = sortedPrePublishedReleases[sortedPrePublishedReleases.length - 1]
const draftRelease = filteredReleases.find((r) => r.draft)
const lastRelease =
Expand Down

0 comments on commit 6cb6a99

Please sign in to comment.