mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 03:28:42 +00:00
feat: add support node
is an alias for the latest version
https://github.com/nvm-sh/nvm#usage
This commit is contained in:
parent
86bf502a33
commit
0093214f7a
2 changed files with 18 additions and 0 deletions
14
.github/workflows/versions.yml
vendored
14
.github/workflows/versions.yml
vendored
|
@ -43,6 +43,20 @@ jobs:
|
|||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
latest-syntax:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
node-version: [node]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Node
|
||||
uses: ./
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
manifest:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
|
|
@ -373,6 +373,10 @@ async function queryDistForMatch(
|
|||
let versions: string[] = [];
|
||||
let nodeVersions = await getVersionsFromDist();
|
||||
|
||||
if (versionSpec === 'node') {
|
||||
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
Reference in a new issue