mirror of
https://github.com/actions/setup-java.git
synced 2026-11-20 03:13:05 +00:00
Add Microsoft OpenJDK 25.0.5.0.2 support (#1320)
* Initial plan * Support Microsoft OpenJDK 25.0.5.0.2 with bundled manifest fallback * Fix Microsoft OpenJDK version matching Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Bruno Borges <brborges@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8,10 +8,12 @@ import {
|
||||
cacheJdkDir,
|
||||
extractJdkFile,
|
||||
getDownloadArchiveExtension,
|
||||
normalizeJavaVersionToSemver,
|
||||
renameWinArchive
|
||||
} from '../../util.js';
|
||||
import * as gpg from '../../gpg.js';
|
||||
import {MICROSOFT_PUBLIC_KEY} from './microsoft-key.js';
|
||||
import bundledVersions from './microsoft-openjdk-versions.json' with {type: 'json'};
|
||||
import {SIGNATURE_VERIFICATION_FAILURE_HELP} from '../../constants.js';
|
||||
import * as core from '@actions/core';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
@@ -108,7 +110,20 @@ export class MicrosoftDistributions extends JavaBase {
|
||||
throw new Error('Could not load manifest for Microsoft Build of OpenJDK');
|
||||
}
|
||||
|
||||
const foundRelease = await tc.findFromManifest(range, true, manifest, arch);
|
||||
const findMatchingRelease = async (releases: tc.IToolRelease[]) => {
|
||||
const matchingReleases = releases
|
||||
.map(release => ({
|
||||
...release,
|
||||
version: normalizeJavaVersionToSemver(release.version)
|
||||
}))
|
||||
.filter(release => this.isVersionSatisfied(range, release.version));
|
||||
|
||||
return tc.findFromManifest(range, true, matchingReleases, arch);
|
||||
};
|
||||
|
||||
const foundRelease =
|
||||
(await findMatchingRelease(manifest)) ??
|
||||
(await findMatchingRelease(bundledVersions));
|
||||
|
||||
if (!foundRelease) {
|
||||
const availableVersionStrings = manifest.map(item => item.version);
|
||||
|
||||
Reference in New Issue
Block a user