Skip to content

Commit

Permalink
v3 new release (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 25, 2022
1 parent 84b304d commit b5b231a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13254,8 +13254,10 @@ function getLatestHelmVersion() {
}
}
`);
const releases = repository.releases.nodes.reverse();
const latestValidRelease = releases.find((release) => isValidVersion(release.tagName));
const releases = repository.releases.nodes
.reverse()
.map((node) => node.tagName);
const latestValidRelease = releases.find((tag) => isValidVersion(tag));
if (latestValidRelease)
return latestValidRelease;
}
Expand Down
8 changes: 4 additions & 4 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export async function getLatestHelmVersion(): Promise<string> {
}
`
)
const releases = repository.releases.nodes.reverse()
const latestValidRelease = releases.find((release: {tagName: string}) =>
isValidVersion(release.tagName)
)
const releases: string[] = repository.releases.nodes
.reverse()
.map((node: {tagName: string}) => node.tagName)
const latestValidRelease = releases.find((tag) => isValidVersion(tag))
if (latestValidRelease) return latestValidRelease
} catch (err) {
core.warning(
Expand Down

0 comments on commit b5b231a

Please sign in to comment.