mirror of
https://github.com/actions/setup-node.git
synced 2026-08-22 08:32:54 +00:00
Rebuild action distribution
This commit is contained in:
parent
8f018f5241
commit
219d4c3cc1
4
dist/cache-save/index.js
vendored
4
dist/cache-save/index.js
vendored
@ -92709,6 +92709,10 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||||||
catch {
|
catch {
|
||||||
core.info('Node version file is not JSON file');
|
core.info('Node version file is not JSON file');
|
||||||
}
|
}
|
||||||
|
const actionRuntime = contents.match(/^runs\s*:\s*$(?:\r?\n(?:[ \t]+[^\r\n]*|[ \t]*))*?\r?\n[ \t]+using:\s*['"]?node(?<version>\d+)['"]?\s*(?:#.*)?$/m);
|
||||||
|
if (actionRuntime?.groups?.version) {
|
||||||
|
return actionRuntime.groups.version;
|
||||||
|
}
|
||||||
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
||||||
return found?.groups?.version ?? contents.trim();
|
return found?.groups?.version ?? contents.trim();
|
||||||
}
|
}
|
||||||
|
|||||||
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
@ -98103,6 +98103,10 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||||||
catch {
|
catch {
|
||||||
core_info('Node version file is not JSON file');
|
core_info('Node version file is not JSON file');
|
||||||
}
|
}
|
||||||
|
const actionRuntime = contents.match(/^runs\s*:\s*$(?:\r?\n(?:[ \t]+[^\r\n]*|[ \t]*))*?\r?\n[ \t]+using:\s*['"]?node(?<version>\d+)['"]?\s*(?:#.*)?$/m);
|
||||||
|
if (actionRuntime?.groups?.version) {
|
||||||
|
return actionRuntime.groups.version;
|
||||||
|
}
|
||||||
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
const found = contents.match(/^(?:node(js)?\s+)?v?(?<version>[^\s]+)$/m);
|
||||||
return found?.groups?.version ?? contents.trim();
|
return found?.groups?.version ?? contents.trim();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,11 +68,8 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
|
|||||||
core.info('Node version file is not JSON file');
|
core.info('Node version file is not JSON file');
|
||||||
}
|
}
|
||||||
|
|
||||||
const runsSection = contents.match(
|
const actionRuntime = contents.match(
|
||||||
/^runs\s*:\s*$(?<contents>[\s\S]*?)(?=^[^\s].*?:|\s*$)/m
|
/^runs\s*:\s*$(?:\r?\n(?:[ \t]+[^\r\n]*|[ \t]*))*?\r?\n[ \t]+using:\s*['"]?node(?<version>\d+)['"]?\s*(?:#.*)?$/m
|
||||||
)?.groups?.contents;
|
|
||||||
const actionRuntime = runsSection?.match(
|
|
||||||
/^\s+using:\s*['"]?node(?<version>\d+)['"]?\s*(?:#.*)?$/m
|
|
||||||
);
|
);
|
||||||
if (actionRuntime?.groups?.version) {
|
if (actionRuntime?.groups?.version) {
|
||||||
return actionRuntime.groups.version;
|
return actionRuntime.groups.version;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user