Skip to content

Commit

Permalink
fix: exclude current release when searching for last release
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Jun 27, 2024
1 parent 837b9d9 commit f4d0840
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ async function run() {
`releases: ${releases.map((release) => release.name).join(', ')}`,
);
const lastRelease = releases.find(
(release) => release.prerelease === currentRelease.prerelease,
(release) =>
release.prerelease === currentRelease.prerelease &&
release.id !== currentRelease.id,
);
core.info(`last release: ${lastRelease?.name}`);
const lastReleaseCommit = lastRelease?.target_commitish;
Expand Down

0 comments on commit f4d0840

Please sign in to comment.