Add workflow and missing dependencies #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CICD | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
build: | |
name: CICD | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
registry-url: 'https://registry.npmjs.org/' | |
cache: 'npm' | |
- name: Setup pnpm and modules | |
run: | | |
npm install -g pnpm | |
pnpm install | |
- name: Check format and lint | |
run: | | |
pnpm run format:check | |
pnpm run lint | |
# TODO: tests | |
- name: Build project | |
run: pnpm run build | |
- name: Publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.BITTE_AI_NPM_TOKEN }} |