add node aliases

This commit is contained in:
panticmilos 2022-04-19 14:08:54 +02:00
parent 146c4d84a5
commit b08c36311d
4 changed files with 5732 additions and 8521 deletions

View file

@ -139,3 +139,35 @@ jobs:
- name: Verify node
run: __tests__/verify-arch.sh "ia32"
shell: bash
node-latest-aliases:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [current, latest, node, "16.14.2"]
steps:
- name: Retrieve version before install
run: |
version=$(echo $(node --version))
echo "::set-output name=NODE_VERSION::$version"
id: version
shell: bash
- uses: actions/checkout@v3
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}
- name: Retrieve version after install
run: |
updatedVersion=$(echo $(node --version))
echo "::set-output name=NODE_VERSION_UPDATED::$updatedVersion"
id: updatedVersion
shell: bash
- name: Compare versions
if: ${{ steps.version.outputs.NODE_VERSION == steps.version.outputs.NODE_VERSION_UPDATED}}
run: |
echo "${{steps.updatedVersion.outputs.NODE_VERSION_UPDATED}}"
echo "${{steps.version.outputs.NODE_VERSION}}"
exit 1

9014
dist/cache-save/index.js vendored

File diff suppressed because it is too large Load diff

5203
dist/setup/index.js vendored

File diff suppressed because it is too large Load diff

View file

@ -373,6 +373,10 @@ async function queryDistForMatch(
let versions: string[] = [];
let nodeVersions = await getVersionsFromDist();
if (versionSpec === 'current' || versionSpec === 'latest' || versionSpec === 'node') {
return nodeVersions[0].version
}
nodeVersions.forEach((nodeVersion: INodeVersion) => {
// ensure this version supports your os and platform
if (nodeVersion.files.indexOf(dataFileName) >= 0) {