MetaMask / metamask-module-template

A simple template repository for starting new modules in the latest MetaMask fashion.
26 stars 23 forks source link

ci: run `corepack enable` before installing dependencies #244

Closed legobeat closed 4 months ago

legobeat commented 4 months ago

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 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.

Mrtenz commented 4 months ago

this means installation of dependencies fail when using yarn >v1:

Not sure I understand. We're using Yarn 3 and 4 in several repos without problems.

mcmire commented 4 months ago

Thanks! I'll go ahead and merge this into my branch.