Commonly recurring patterns wrapped neatly in re-usable actions.
This setup action is to be used in yarn classic repositories (version < 2). It
- configures the node version from
.nvmrcwhich is assumed at the repository root - grants access to the private registry, using
npm-tokeninput - configures caching to restore
node_modulesandsrc/node_modules
It can be used as simple as
name: Tests
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ExodusMovement/actions/setup/yarn@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}
- run: yarn run deps:install
- run: yarn lint
- run: yarn testThis setup action is to be used in yarn berry repositories (version >= 2). It differs from the yarn classic setup action in two regards
- it restores
.yarn/cacheinstead ofnode_modules - it grants access to the private registry through
yarn config setbecause.npmrcfiles are disregarded by yarn berry
To use it, only the following detail has to be changed compared with the above snippet
- - uses: ExodusMovement/actions/setup/yarn@master
+ - uses: ExodusMovement/actions/setup/yarn-berry@masterThis setup action layers on top of the yarn berry action and adds cache retrieval of the nx cache in a lerna monorepo.
Use it as
- uses: ExodusMovement/actions/setup/lerna@master
with:
npm-token: ${{ secrets.NPM_TOKEN }}or if you need publish permissions
- uses: ExodusMovement/actions/setup/lerna@master
with:
npm-token: ${{ secrets.NPM_PUBLISH_TOKEN }}