mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-19 12:54:45 +00:00
Expand current syntax to support aliases for latest version (current/latest/node) (#483)
This commit is contained in:
parent
b067f78ed3
commit
17f8bd9264
5 changed files with 75 additions and 0 deletions
|
@ -373,6 +373,15 @@ async function queryDistForMatch(
|
|||
let versions: string[] = [];
|
||||
let nodeVersions = await getVersionsFromDist();
|
||||
|
||||
if (
|
||||
versionSpec === 'current' ||
|
||||
versionSpec === 'latest' ||
|
||||
versionSpec === 'node'
|
||||
) {
|
||||
core.info(`getting latest node version...`);
|
||||
return nodeVersions[0].version;
|
||||
}
|
||||
|
||||
nodeVersions.forEach((nodeVersion: INodeVersion) => {
|
||||
// ensure this version supports your os and platform
|
||||
if (nodeVersion.files.indexOf(dataFileName) >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue