Support new GraalVM for JDK17/JDK20 release

This commit adds support for the new GraalVM for JDK17/JDK20 release, including the new Oracle GraalVM distribution.
For this, users only need to specify the 'java-version' option and the new 'distribution' option.
The 'version' option is now marked as optional and kept for compatibility with older GraalVM releases and Mandrel.
This commit is contained in:
Fabio Niephaus
2023-06-16 09:19:49 +02:00
parent 17d64df2bb
commit fc45baf59f
14 changed files with 756 additions and 216 deletions

View File

@@ -8,6 +8,17 @@ export async function checkForUpdates(
graalVMVersion: string,
javaVersion: string
): Promise<void> {
if (
graalVMVersion.length > 0 &&
(javaVersion === '17' || javaVersion === '19')
) {
const recommendedJDK = javaVersion === '17' ? '17' : '20'
core.notice(
`A new GraalVM release is available! Please consider upgrading to GraalVM for JDK ${recommendedJDK}. Release notes: https://www.graalvm.org/release-notes/JDK_${recommendedJDK}/`
)
return
}
if (graalVMVersion.startsWith('22.3.') && javaVersion === '11') {
core.notice(
'Please consider upgrading your project to Java 17+. GraalVM 22.3.X releases are the last to support JDK11: https://github.com/oracle/graal/issues/5063'