Skip to content

New API design for the package with Types class #16

New API design for the package with Types class

New API design for the package with Types class #16

Workflow file for this run

name: Check, Build & Publish Package
on:
push:
branches: [main]
pull_request:
branches: '*'
jobs:
check-and-build:
runs-on: ${{ matrix.os }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, macos-latest, windows-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Install, check, test, and build using Node.js ${{ matrix.node-version }} ⚙️
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run pretty
- run: npm run test --if-present
- run: npm run build
publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
needs: [check-and-build]
permissions:
actions: write
packages: write
contents: write
issues: write
pull-requests: write
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Deploy and Publish package using Node.js v18 🚀
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm run build
- run: npm run release