Skip to content

feat: build hybrid cjs/esm package #21

feat: build hybrid cjs/esm package

feat: build hybrid cjs/esm package #21

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# 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: CI
on:
pull_request:
branches: ['main']
jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: build
run: npm run build
- name: package dry run
run: npm run pack
lint:
name: 'Lint'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm i
- name: Lint packages
run: npm run lint