# This workflow will build the library.
on: [push]

jobs:
  build:
    name: Build Library
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18.x]
    steps:
    - uses: actions/checkout@v2

    - name: Use Node.js ${{ env.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ env.node-version }}

    - name: Build Library using NodeJS ${{ env.node-version }}
      run: |
        # Build the project
        npm install
        npm run all
        npm run test --if-present

    - name: Build Artifacts
      uses: actions/upload-artifact@v4
      with:
        name: dist
        path: dist
