This hacks around it by running @actions/setup-node twice: once before checkout to install the node-version, so that corepack enable can be run, after which the normal flow starting with checkout can proceed.
Since .nvmrc is not available before checkout, it also implies not using .nvmrc to specify node-version for this workflow anymore.
An alternative to this would be forking @actions/setup-node with the patch from the PR linked above but sounds not worth it.
corepack
is not currently supported in@actions/setup-node
and this means installation of dependencies fail when using yarn >v1:This hacks around it by running
@actions/setup-node
twice: once before checkout to install the node-version, so thatcorepack enable
can be run, after which the normal flow starting with checkout can proceed.Since
.nvmrc
is not available before checkout, it also implies not using.nvmrc
to specify node-version for this workflow anymore.An alternative to this would be forking
@actions/setup-node
with the patch from the PR linked above but sounds not worth it.