v3 new release (#101)

This commit is contained in:
github-actions[bot] 2022-10-27 10:04:25 -04:00 committed by GitHub
parent b5b231a831
commit f382f75448
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
717 changed files with 4912 additions and 33943 deletions

View file

@ -59,19 +59,23 @@ export async function getLatestHelmVersion(): Promise<string> {
`
{
repository(name: "helm", owner: "helm") {
releases(last: 100) {
releases(first: 100, orderBy: {field: CREATED_AT, direction: DESC}) {
nodes {
tagName
isLatest
isDraft
isPrerelease
}
}
}
}
`
)
const releases: string[] = repository.releases.nodes
.reverse()
.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(