Incorporate reviewer feedback.

This commit is contained in:
Fabio Niephaus
2023-06-16 10:31:54 +02:00
committed by Fabio Niephaus
parent c871f91ee0
commit 830cd48f7f
4 changed files with 17 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
import * as c from './constants'
import * as core from '@actions/core'
import * as graalvm from './graalvm'
import {gte as semverGte, valid as semverValid} from 'semver'
import {isFeatureAvailable as isCacheAvailable} from '@actions/cache'
import {join} from 'path'
import {restore} from './features/cache'
@@ -69,7 +70,10 @@ async function run(): Promise<void> {
} else {
switch (graalvmVersion) {
case c.VERSION_LATEST:
if (javaVersion.startsWith('17') || javaVersion.startsWith('20')) {
if (
javaVersion.startsWith('17') ||
(semverValid(javaVersion) && semverGte(javaVersion, '20'))
) {
core.info(
`This build is using the new Oracle GraalVM. To select a specific distribution, use the 'distribution' option (see https://github.com/graalvm/setup-graalvm/tree/main#options).`
)