only retrieve a version that has at least 6 assets (#90)

Address #23
This commit is contained in:
idodod 2024-04-18 13:38:39 -04:00 committed by GitHub
parent 6a7e7d67e6
commit b6ad1e7419
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

3
dist/setup/index.js vendored
View File

@ -90176,7 +90176,8 @@ async function getVersionObject(range, prerelease) {
repo: "earthly", repo: "earthly",
per_page: 100, per_page: 100,
})).filter(release => { })).filter(release => {
return prerelease || !release.prerelease; // we expect each version to have at least 6 assets before it can be considered as latest available version
return (prerelease || !release.prerelease) && release.assets?.length > 5;
}).reduce((acc, cur) => { }).reduce((acc, cur) => {
// remove 'v' from tag name // remove 'v' from tag name
const tag = cur.tag_name.substring(1); const tag = cur.tag_name.substring(1);

File diff suppressed because one or more lines are too long

View File

@ -23,7 +23,8 @@ export async function getVersionObject(
per_page: 100, per_page: 100,
}) })
).filter(release => { ).filter(release => {
return prerelease || !release.prerelease; // we expect each version to have at least 6 assets before it can be considered as latest available version
return (prerelease || !release.prerelease) && release.assets?.length > 5;
}).reduce((acc, cur) => { }).reduce((acc, cur) => {
// remove 'v' from tag name // remove 'v' from tag name
const tag = cur.tag_name.substring(1); const tag = cur.tag_name.substring(1);