Rebuild action distribution

This commit is contained in:
copilot-swe-agent[bot] 2026-07-27 02:37:25 +00:00 committed by GitHub
parent 8f018f5241
commit 219d4c3cc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 5 deletions

View File

@ -92709,6 +92709,10 @@ function getNodeVersionFromFile(versionFilePath) {
catch {
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);
return found?.groups?.version ?? contents.trim();
}

4
dist/setup/index.js vendored
View File

@ -98103,6 +98103,10 @@ function getNodeVersionFromFile(versionFilePath) {
catch {
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);
return found?.groups?.version ?? contents.trim();
}

View File

@ -68,11 +68,8 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
core.info('Node version file is not JSON file');
}
const runsSection = contents.match(
/^runs\s*:\s*$(?<contents>[\s\S]*?)(?=^[^\s].*?:|\s*$)/m
)?.groups?.contents;
const actionRuntime = runsSection?.match(
/^\s+using:\s*['"]?node(?<version>\d+)['"]?\s*(?:#.*)?$/m
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;