Skip to content

fix: correct main.yml #3

fix: correct main.yml

fix: correct main.yml #3

Workflow file for this run

name: CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "16.x"
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run lint
publish:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}