Skip to content

Chore: GitHub action workflow for build check #5

Chore: GitHub action workflow for build check

Chore: GitHub action workflow for build check #5

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Node version from package.json
id: get-version
run: echo ::set-output name=node::$(jq -r .engines.node ./package.json)
- name: Print node version
run: echo ${{ steps.get-version.outputs.node }}
- name: Use Node.js ${{ steps.get-version.outputs.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.get-version.outputs.node }}
cache: 'yarn'
- run: yarn install
- run: yarn build
# - run: yarn test