Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lts/-n aliases #481

Merged
merged 5 commits into from
Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,21 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*]
node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*, lts/-1]
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- if: runner.os != 'Windows'
name: Verify node and npm
run: |
. "$NVM_DIR/nvm.sh"
[[ $(nvm version-remote "${{ matrix.node-version }}") =~ ^v([^.]+) ]]
__tests__/verify-node.sh "${BASH_REMATCH[1]}"
shell: bash

manifest:
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The `node-version` input supports the following values:

- Major versions: `12`, `14`, `16`
- More specific versions: `10.15`, `14.2.0`, `16.3.0`
- NVM LTS syntax: `lts/erbium`, `lts/fermium`, `lts/*`
- NVM LTS syntax: `lts/erbium`, `lts/fermium`, `lts/*`, `lts/-n`
- Latest release: `latest`/`current`/`node`

**Note:** Since the latest release will not be cached always, there is possibility of hitting rate limit when downloading from dist
Expand Down
338 changes: 182 additions & 156 deletions __tests__/data/versions-manifest.json
Original file line number Diff line number Diff line change
@@ -1,157 +1,183 @@
[
{
"version": "14.0.0",
"stable": true,
"lts": "Fermium",
"release_url": "https://github.com/actions/node-versions/releases/tag/14.0.0-20200423.30",
"files": [
{
"filename": "node-14.0.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200423.30/node-14.0.0-darwin-x64.tar.gz"
},
{
"filename": "node-14.0.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200423.30/node-14.0.0-linux-x64.tar.gz"
},
{
"filename": "node-14.0.0-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200423.30/node-14.0.0-win32-x64.zip"
}
]
},
{
"version": "13.13.0",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/13.13.0-20200423.29",
"files": [
{
"filename": "node-13.13.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200423.29/node-13.13.0-darwin-x64.tar.gz"
},
{
"filename": "node-13.13.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200423.29/node-13.13.0-linux-x64.tar.gz"
},
{
"filename": "node-13.13.0-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200423.29/node-13.13.0-win32-x64.zip"
}
]
},
{
"version": "12.16.2",
"stable": true,
"lts": "Erbium",
"release_url": "https://github.com/actions/node-versions/releases/tag/12.16.2-20200423.28",
"files": [
{
"filename": "node-12.16.2-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-darwin-x64.tar.gz"
},
{
"filename": "node-12.16.2-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-linux-x64.tar.gz"
},
{
"filename": "node-12.16.2-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200423.28/node-12.16.2-win32-x64.zip"
}
]
},
{
"version": "10.20.1",
"stable": true,
"lts": "Dubnium",
"release_url": "https://github.com/actions/node-versions/releases/tag/10.20.1-20200423.27",
"files": [
{
"filename": "node-10.20.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200423.27/node-10.20.1-darwin-x64.tar.gz"
},
{
"filename": "node-10.20.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200423.27/node-10.20.1-linux-x64.tar.gz"
},
{
"filename": "node-10.20.1-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200423.27/node-10.20.1-win32-x64.zip"
}
]
},
{
"version": "8.17.0",
"stable": true,
"lts": "Carbon",
"release_url": "https://github.com/actions/node-versions/releases/tag/8.17.0-20200423.26",
"files": [
{
"filename": "node-8.17.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200423.26/node-8.17.0-darwin-x64.tar.gz"
},
{
"filename": "node-8.17.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200423.26/node-8.17.0-linux-x64.tar.gz"
},
{
"filename": "node-8.17.0-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200423.26/node-8.17.0-win32-x64.zip"
}
]
},
{
"version": "6.17.1",
"stable": true,
"lts": "Boron",
"release_url": "https://github.com/actions/node-versions/releases/tag/6.17.1-20200423.25",
"files": [
{
"filename": "node-6.17.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200423.25/node-6.17.1-darwin-x64.tar.gz"
},
{
"filename": "node-6.17.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200423.25/node-6.17.1-linux-x64.tar.gz"
},
{
"filename": "node-6.17.1-win32-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200423.25/node-6.17.1-win32-x64.zip"
}
]
}
]
{
"version": "14.0.0",
"stable": true,
"lts": "Fermium",
"release_url": "https://github.com/actions/node-versions/releases/tag/14.0.0-20200507.99",
"files": [
{
"filename": "node-14.0.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200507.99/node-14.0.0-darwin-x64.tar.gz"
},
{
"filename": "node-14.0.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200507.99/node-14.0.0-linux-x64.tar.gz"
},
{
"filename": "node-14.0.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/14.0.0-20200507.99/node-14.0.0-win32-x64.7z"
}
]
},
{
"version": "13.13.0",
"stable": true,
"release_url": "https://github.com/actions/node-versions/releases/tag/13.13.0-20200507.97",
"files": [
{
"filename": "node-13.13.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200507.97/node-13.13.0-darwin-x64.tar.gz"
},
{
"filename": "node-13.13.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200507.97/node-13.13.0-linux-x64.tar.gz"
},
{
"filename": "node-13.13.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/13.13.0-20200507.97/node-13.13.0-win32-x64.7z"
}
]
},
{
"version": "12.16.2",
"stable": true,
"lts": "Erbium",
"release_url": "https://github.com/actions/node-versions/releases/tag/12.16.2-20200507.95",
"files": [
{
"filename": "node-12.16.2-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200507.95/node-12.16.2-darwin-x64.tar.gz"
},
{
"filename": "node-12.16.2-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200507.95/node-12.16.2-linux-x64.tar.gz"
},
{
"filename": "node-12.16.2-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/12.16.2-20200507.95/node-12.16.2-win32-x64.7z"
}
]
},
{
"version": "12.0.0",
"stable": true,
"lts": "Erbium",
"release_url": "https://github.com/actions/node-versions/releases/tag/12.0.0-20200507.71",
"files": [
{
"filename": "node-12.0.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/12.0.0-20200507.71/node-12.0.0-darwin-x64.tar.gz"
},
{
"filename": "node-12.0.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/12.0.0-20200507.71/node-12.0.0-linux-x64.tar.gz"
},
{
"filename": "node-12.0.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/12.0.0-20200507.71/node-12.0.0-win32-x64.7z"
}
]
},
{
"version": "10.20.1",
"stable": true,
"lts": "Dubnium",
"release_url": "https://github.com/actions/node-versions/releases/tag/10.20.1-20200507.70",
"files": [
{
"filename": "node-10.20.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200507.70/node-10.20.1-darwin-x64.tar.gz"
},
{
"filename": "node-10.20.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200507.70/node-10.20.1-linux-x64.tar.gz"
},
{
"filename": "node-10.20.1-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/10.20.1-20200507.70/node-10.20.1-win32-x64.7z"
}
]
},
{
"version": "8.17.0",
"stable": true,
"lts": "Carbon",
"release_url": "https://github.com/actions/node-versions/releases/tag/8.17.0-20200507.37",
"files": [
{
"filename": "node-8.17.0-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200507.37/node-8.17.0-darwin-x64.tar.gz"
},
{
"filename": "node-8.17.0-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200507.37/node-8.17.0-linux-x64.tar.gz"
},
{
"filename": "node-8.17.0-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/8.17.0-20200507.37/node-8.17.0-win32-x64.7z"
}
]
},
{
"version": "6.17.1",
"stable": true,
"lts": "Boron",
"release_url": "https://github.com/actions/node-versions/releases/tag/6.17.1-20200529.2",
"files": [
{
"filename": "node-6.17.1-darwin-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200529.2/node-6.17.1-darwin-x64.tar.gz"
},
{
"filename": "node-6.17.1-linux-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200529.2/node-6.17.1-linux-x64.tar.gz"
},
{
"filename": "node-6.17.1-win32-x64.7z",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/node-versions/releases/download/6.17.1-20200529.2/node-6.17.1-win32-x64.7z"
}
]
}
]
Loading