Releases: actions/setup-node
Add "cache-hit" output
This release introduces a new output: cache-hit
(#327).
The cache-hit
output contains boolean value indicating that an exact match was found for the key. It shows that the action uses already existing cache or not. The output is available only if cache is enabled.
Support caching for mono repos and repositories with complex structure
This release introduces dependency caching support for mono repos and repositories with complex structure (#305).
By default, the action searches for the dependency file (package-lock.json
or yarn.lock
) in the repository root. Use the cache-dependency-path
input for cases when multiple dependency files are used, or they are located in different subdirectories. This input supports wildcards or a list of file names for caching multiple dependencies.
Yaml example:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
cache: npm
cache-dependency-path: 'sub-project/package-lock.json'
For more examples of using cache-dependency-path
input, see the Advanced usage guide.
Revert temporary fix
We had to disable pre-cached Node.js usage in the previous version due to the broken image cache. Now cache is fixed, so we can safely enable its usage again.
Thank you for understanding.
Revert temporary fix for v1
We had to disable pre-cached Node.js usage in the previous version due to the broken image cache. Now cache is fixed, so we can safely enable its usage again.
Thank you for understanding.
Temporary maintenance fix.
Temporarily disabled usage of pre-cached Node.js.
Temporary maintenance fix
Temporarily disabled usage of pre-cached Node.js
Support caching pnpm dependencies
This release introduces dependency caching support for the pnpm
package manager (#278).
Caching pnpm dependencies:
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 6.10.0
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'pnpm'
- run: pnpm install
- run: pnpm test
NOTE: pnpm caching support requires pnpm version >= 6.10.0
Support caching dependencies and LTS aliases
This release brings two major features:
Supported version syntax
The node-version
input supports the following syntax:
major versions: 12
, 14
, 16
more specific versions: 10.15
, 14.2.0
, 16.3.0
nvm LTS syntax: lts/erbium
, lts/fermium
, lts/*
Caching dependencies
The action has a built-in functionality for caching and restoring npm/yarn dependencies. Supported package managers are npm
, yarn
. The cache
input is optional, and caching is turned off by default.
Caching npm dependencies:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'npm'
- run: npm install
- run: npm test
Caching yarn dependencies:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- run: yarn test
Yarn caching handles both yarn versions: 1 or 2.
At the moment, only
lock
files in the project root are supported.
v2.1.5 Release
Improve error and warning line number handling (problem matcher regex)
v2.1.4
The first stable release of actions/setup-node V2