https://github.com/nodenv/actions-node-version
(distribution repo to facilitate GH Marketplace listing)
https://github.com/nodenv/actions-node-version
Last synced: 11 months ago
JSON representation
(distribution repo to facilitate GH Marketplace listing)
- Host: GitHub
- URL: https://github.com/nodenv/actions-node-version
- Owner: nodenv
- Created: 2020-03-20T03:08:24.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T17:25:10.000Z (over 3 years ago)
- Last Synced: 2024-03-26T05:09:50.725Z (about 2 years ago)
- Language: JavaScript
- Homepage:
- Size: 64.5 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-version [](https://github.com/nodenv/actions)
[](https://github.com/nodenv/actions-node-version/releases/latest)
[](https://github.com/nodenv/actions/actions/workflows/test.yml)
[](https://github.com/nodenv/actions/actions/workflows/examples.yml)
## Usage
Determines node version via `nodenv local` and sets it as an output for use in subsequent steps.
```yml
steps:
- id: nodenv
uses: nodenv/actions/node-version@v3
- run: echo ${{ steps.nodenv.outputs.node-version }}
```
### usage with setup-node
Example demonstrating combined use with GitHub's own setup-node action:
```yml
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
```
## Special Note
This action is maintained within the [nodenv/actions monorepo](https://github.com/nodenv/actions),
but released through its [own repository](https://github.com/nodenv/actions-node-version)
(in order to be listed in the GitHub Marketplace).
You may reference either one in your workflows:
```yml
# 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](https://github.com/nodenv/actions), please!**