Skip to content

Upload npm

Upload npm #32

name: chDB-node
on:
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/.md'
push:
branches: [ "main" ]
paths-ignore:
- '**/.md'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [14.x, 16.x, 18.x]
steps:
- name: Use Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Build libchdb
run: npm run libchdb
- name: Build project
run: npm run build
- name: Run tests
run: npm run test
- name: Publish to npm
if: github.ref == 'refs/heads/main' && matrix.node-version == '14.x' && matrix.os == 'ubuntu-latest'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}