Skip to content

Update ci.yml

Update ci.yml #3

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Upgrade npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm install
- name: Lint code
run: npm run lint
- name: Run tests
run: npm test
- name: Build project
run: npm run build
- name: Publish package
if: github.ref == 'refs/heads/main'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.TOKEN }}