Skip to content

Support .tool-versions file #70

@puku0x

Description

@puku0x

actions/setup-node supports an option node-version-file: '.tool-versions'.

Currently nrwl/nx-cloud-workflows/v4/workflow-steps/install-node/main.yaml supports nvm but it would be nice to have another option.

This is an example using asdf.

# .tool-versions
nodejs 20.17.0
- name: Checkout
  uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/checkout/main.yaml'
- name: Setup Node.js
  script: |
    git clone https://github.com/asdf-vm/asdf.git $HOME/.asdf --branch v0.14.1
    source $HOME/.asdf/asdf.sh
    asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
    asdf install nodejs
    echo "PATH=$PATH" >> $NX_CLOUD_ENV
- name: Restore NPM Cache
  uses: 'nrwl/nx-cloud-workflows/v4/workflow-steps/cache/main.yaml'
  inputs:
    key: '.tool-versions'
    paths: ~/.npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions