Compare commits

..

6 Commits

Author SHA1 Message Date
5273d0df9c Add auth 2019-08-06 18:29:44 -04:00
fc9ff49b90 Update version 2019-08-05 22:07:27 -04:00
552489ce4b Fix backup downloads 2019-08-05 22:05:24 -04:00
401832ee64 Update to 1.0.3 2019-08-05 16:51:20 -04:00
b0d4a002ac Update io 2019-08-05 16:49:04 -04:00
ea546c14bf Update package version 2019-08-05 15:42:48 -04:00
4 changed files with 10 additions and 23 deletions

View File

@ -1,9 +1,5 @@
# setup-node
<p align="left">
<a href="https://github.com/actions/setup-node"><img alt="GitHub Actions status" src="https://github.com/actions/setup-node/workflows/Main%20workflow/badge.svg"></a>
</p>
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
@ -19,7 +15,7 @@ steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '10.x'
version: '10.x'
- run: npm install
- run: npm test
```
@ -38,7 +34,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
version: ${{ matrix.node }}
- run: npm install
- run: npm test
```
@ -49,7 +45,7 @@ steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '10.x'
version: '10.x'
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm publish
@ -69,7 +65,7 @@ steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
with:
node-version: '10.x'
version: '10.x'
registry-url: <registry url>
- run: npm install -g yarn
- run: yarn install

View File

@ -1,17 +1,14 @@
name: 'Setup Node.js environment'
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:
node-version:
description: 'Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0'
inputs:
version:
description: 'Version Spec of the version to use. Examples: 10.x, 10.15.1, >=10.15.0, lts'
default: '10.x'
registry-url:
description: 'Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN'
scope:
description: 'Optional scope for authenticating against scoped registries'
# Deprecated option, do not use. Will not be supported after October 1, 2019
version:
description: 'Deprecated. Use node-version instead. Will not be supported after October 1, 2019'
runs:
using: 'node12'
main: 'lib/setup-node.js'

View File

@ -26,10 +26,7 @@ function run() {
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
//
let version = core.getInput('version');
if (!version) {
version = core.getInput('node-version');
}
const version = core.getInput('version');
if (version) {
// TODO: installer doesn't support proxy
yield installer.getNode(version);

View File

@ -9,10 +9,7 @@ async function run() {
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
//
let version = core.getInput('version');
if (!version) {
version = core.getInput('node-version');
}
const version = core.getInput('version');
if (version) {
// TODO: installer doesn't support proxy
await installer.getNode(version);