# This workflow will do a clean install of node dependencies, build the source code and publish the code to the web-serial-polyfill npm package
# For more information see: https://github.com/marketplace/actions/npm-publish

name: NPM publish

on:
  push:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v1
      with:
        node-version: '10'
    - run: npm install
    - run: npm run build
    - uses: JS-DevTools/npm-publish@v1
      with:
        token: ${{ secrets.NPM_TOKEN }}

# This workflow will do a clean install of node dependencies, build the source code and publish the code to the web-serial-polyfill npm package
# For more information see: https://github.com/marketplace/actions/npm-publish

name: NPM publish

on:
  push:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v1
      with:
        node-version: '18'
    - run: npm install
    - run: npm run build
    - uses: JS-DevTools/npm-publish@v1
      with:
        token: ${{ secrets.NPM_TOKEN }}

Use Node 18 for NPM publish
Use Node 18 for NPM publish