Determines node version via nodenv local
and sets it as an output for use in subsequent steps.
steps:
- id: nodenv
uses: nodenv/actions/node-version@v3
- run: echo ${{ steps.nodenv.outputs.node-version }}
Example demonstrating combined use with GitHub's own setup-node action:
steps:
- uses: nodenv/actions/node-version@v3
id: nodenv
- uses: actions/setup-node@v3
with:
node-version: '${{ steps.nodenv.outputs.node-version }}'
- run: node -v
This action is maintained within the nodenv/actions monorepo, but released through its own repository (in order to be listed in the GitHub Marketplace). You may reference either one in your workflows:
# pulls from the monorepo
- uses: nodenv/actions/node-version@v3
# pulls from the release repo
- uses: nodenv/actions-node-version@v3
Issues and Pull Requests should be opened in the monorepo, please!