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

feat: add support for current and latest aliases #279

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: add support for latest alias
  • Loading branch information
theoludwig committed Jul 1, 2021
commit 0418ee25e829bb4d3e83a757c557fabd8ac080bd
14 changes: 14 additions & 0 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,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: [latest]
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}

manifest:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
2 changes: 1 addition & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65299,7 +65299,7 @@ function queryDistForMatch(versionSpec, arch = os.arch()) {
}
let versions = [];
let nodeVersions = yield module.exports.getVersionsFromDist();
if (versionSpec === 'current') {
if (versionSpec === 'current' || versionSpec === 'latest') {
return nodeVersions[0].version;
}
nodeVersions.forEach((nodeVersion) => {
Expand Down
2 changes: 1 addition & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ async function queryDistForMatch(
let versions: string[] = [];
let nodeVersions = await module.exports.getVersionsFromDist();

if (versionSpec === 'current') {
if (versionSpec === 'current' || versionSpec === 'latest') {
return nodeVersions[0].version
}

Expand Down