Rebuild action distribution
This commit is contained in:
parent
8f018f5241
commit
219d4c3cc1
3 changed files with 10 additions and 5 deletions
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue