Node/Bun version
To make all workflows generated by SCI as consistent as possible, each of them has a step where specific version of node or bun is set. It should look more or less like this:
- name: 🌿 Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
in case your package manager is npm
, yarn
or pnpm
, and like this:
- name: 🥟 Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: ".bun-version" :
if your project uses bun
.
For more information, check actions/setup-node and actions/setup-bun.
Caching global package manager data​
Note the field cache
in setup step. It is set to your package manager to enable caching of global packages data.
node_modules
is not cached.
Node version file​
The node-version-file
field will be set to point to a file in your repository from which
node version should be retrieved. Possible values are:
.nvmrc
if exists,.node-version
if exists,package.json
, if eitherengines.node
orvolta.node
fields are specified.
If SCI fails to detect files satisfying these conditions, it will create .nvmrc
file in your project with
default node version.
Also, the workflow step will have the field cache
set to your package manager to enable global packages data caching.
Bun version file​
Similarly to how SCI detects node version and creates .nvmrc
file in case of failure, if your
projects uses bun
and SCI fails to detect .bun-version
file, it will create it with default bun version,
which will be provided in generated workflows in the bun-version-file
field.