Skip to content

update package.json to have repo, license, and readme #6

update package.json to have repo, license, and readme

update package.json to have repo, license, and readme #6

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: |
cd lib
npm install
- name: Run code quality check
run: |
cd lib
npm run check
- name: Build the package
run: |
cd lib
npm run build
publish:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: |
cd lib
npm install
- name: Build the package
run: |
cd lib
npm run build
- name: Publish to npm
run: |
cd lib
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}