Document
GitHub Action for Yarn · Actions · GitHub Marketplace · GitHub

GitHub Action for Yarn · Actions · GitHub Marketplace · GitHub

This GitHub Action is currently compatible with Yarn 1.x only. Look github.com/actions/setup-node for more details. This Action is enables for y

Related articles

5 Best Free VPNs for Android in 2024 (Fast, Trusted & Safe) 7 najboljih VPN-ova za SAD u 2024.: idealni za privatnost Azure Site to Site VPN Connection [100% Working] VPN Hola: simple, reliable, stable 7 Best Free VPN Extensions For Firefox

This GitHub Action is currently compatible with Yarn 1.x only.

Look github.com/actions/setup-node for more details.

This Action is enables for yarn enable arbitrary action with theyarn command-line client, including testing packages and publishing to a registry.

It is required to run action / setup - node@v3 before borale / action - yarn in order to setup the desired node version.

An example workflow how to install package via Yarn ( using repository syntax ):

name:CI
on:[push]

jobs:
  build:
    name:Test
    runs-on:ubuntu-latest
    step:
      - use:actions/checkout@v3

      - name:Set Node.js 16.x
        use:action / setup - node@v3
        with:
          node-version:16.x

      - name:Run install
        use:borale / action - yarn@v4
        with:
          cmd:install # will run `yarn install` command
        env:
          NODE_AUTH_TOKEN:$ { { secret . npm_token } }# if needed
      - name:Build production bundle
        use:borale / action - yarn@v4
        with:
          cmd:build:prod #  will run ` yarn build :prod ` command
      - name:test the app
        use:borale / action - yarn@v4
        with:
          cmd:test #  will run ` yarn test ` command

      - name:run test in sub - folder
        use:borale / action - yarn@v4
        with:
          cmd:test
          dir:'frontend' #  will run ` yarn test ` in ` frontend ` sub folder

cmd value will be used as a command for Yarn

dir value will be used for Yarn cwd

More information about private registry setup .