mirror of
https://github.com/actions/setup-node.git
synced 2025-04-03 01:49:34 +08:00
init
This commit is contained in:
commit
47177e86fd
22
LICENSE
Normal file
22
LICENSE
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 GitHub, Inc. and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
43
README.md
Normal file
43
README.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
# @actions/setup-node
|
||||
|
||||
This action sets by node environment for use in actions by:
|
||||
|
||||
- optionally downloading and caching a version of node - npm by version spec and add to PATH
|
||||
- registering problem matchers for error output
|
||||
- configuring authentication for npm packages
|
||||
- configuring proxy if the runner is configured to use a proxy (coming with private runners)
|
||||
|
||||
# Usage
|
||||
|
||||
See [action.yml](action.yml)
|
||||
|
||||
Basic:
|
||||
```yaml
|
||||
actions:
|
||||
- uses: actions/setup-node@latest
|
||||
with:
|
||||
version: 10.x
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
Matrix Testing:
|
||||
```yaml
|
||||
workflow:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
node: [ 10, 8 ]
|
||||
name: Node ${{ matrix.node }} sample
|
||||
actions:
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@latest
|
||||
with:
|
||||
version: ${{ matrix.node }}
|
||||
- run: npm install
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
The scripts and documentation in this project are released under the [MIT License](LICENSE)
|
13
action.yml
Normal file
13
action.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
name: 'Setup Node.js for use with actions'
|
||||
description: 'Setup a Node.js environment and add it to the PATH, additionally providing proxy support'
|
||||
author: 'GitHub'
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0'
|
||||
default: '10.x'
|
||||
checkLatest:
|
||||
description: 'Always checks online for the latest available version that satisfies the version spec. This is typically false unless you have a specific scenario to always get latest. This will cause it to incur download costs when potentially not necessary, especially with the hosted build pool.'
|
||||
default: 'false'
|
||||
runs:
|
||||
using: 'node'
|
||||
main: 'usenode.js'
|
Loading…
Reference in New Issue
Block a user