mirror of
https://github.com/actions/setup-python.git
synced 2025-07-22 11:48:20 +02:00
add check-latest for python versions
This commit is contained in:
parent
c57f79353b
commit
4841389b47
9 changed files with 2136 additions and 1635 deletions
|
@ -14,20 +14,26 @@ export const MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_O
|
|||
|
||||
export async function findReleaseFromManifest(
|
||||
semanticVersionSpec: string,
|
||||
architecture: string
|
||||
architecture: string,
|
||||
manifest: tc.IToolRelease[] | null
|
||||
): Promise<tc.IToolRelease | undefined> {
|
||||
const manifest: tc.IToolRelease[] = await tc.getManifestFromRepo(
|
||||
MANIFEST_REPO_OWNER,
|
||||
MANIFEST_REPO_NAME,
|
||||
AUTH,
|
||||
MANIFEST_REPO_BRANCH
|
||||
);
|
||||
return await tc.findFromManifest(
|
||||
if(!manifest) {
|
||||
manifest = await getManifest();
|
||||
}
|
||||
|
||||
const foundRelease = await tc.findFromManifest(
|
||||
semanticVersionSpec,
|
||||
false,
|
||||
manifest,
|
||||
architecture
|
||||
);
|
||||
|
||||
return foundRelease;
|
||||
}
|
||||
|
||||
export function getManifest(): Promise<tc.IToolRelease[]> {
|
||||
core.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`);
|
||||
return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH);
|
||||
}
|
||||
|
||||
async function installPython(workingDirectory: string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue