mirror of
https://github.com/Azure/setup-helm.git
synced 2025-11-07 13:06:56 +00:00
Update src/run.ts
Co-authored-by: Sander Verweij <sverweij@users.noreply.github.com>
This commit is contained in:
parent
25628192e0
commit
6909a53305
1 changed files with 6 additions and 4 deletions
10
src/run.ts
10
src/run.ts
|
|
@ -71,10 +71,12 @@ export async function getLatestHelmVersion(): Promise<string> {
|
|||
}
|
||||
`
|
||||
)
|
||||
const releases: string[] = repository.releases.nodes.map(
|
||||
(node: {tagName: string}) => node.tagName
|
||||
)
|
||||
const latestValidRelease = releases.find((tag) => isValidVersion(tag))
|
||||
const latestValidRelease: string = repository.releases.nodes
|
||||
.find(
|
||||
({tagName, isLatest, isDraft, isPreRelease}) =>
|
||||
isValidVersion(tagName) && isLatest && !isDraft && !isPreRelease
|
||||
)?.tagName
|
||||
|
||||
if (latestValidRelease) return latestValidRelease
|
||||
} catch (err) {
|
||||
core.warning(
|
||||
|
|
|
|||
Loading…
Reference in a new issue