Skip to content

Commit

Permalink
Update CI configs
Browse files Browse the repository at this point in the history
  • Loading branch information
puzpuzpuz committed Oct 9, 2023
1 parent 25496d5 commit 7ca5cfb
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: build

on:
push:
on: [push]

jobs:
build:
name: Build @questdb/nodejs-questdb-client
test:
name: Build with Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 20]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -16,7 +18,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci
Expand All @@ -26,12 +28,3 @@ jobs:

- name: Run linter
run: npm run eslint

- name: Publish @questdb/nodejs-questdb-client to npm
if: github.ref == 'refs/heads/main'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.CI_TOKEN }}
access: public
check-version: true
package: package.json
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build

on:
push:
branches:
- main

jobs:
build:
name: Publish @questdb/nodejs-questdb-client to npm
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Run linter
run: npm run eslint

- name: Publish
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.CI_TOKEN }}
access: public
strategy: all
package: package.json

0 comments on commit 7ca5cfb

Please sign in to comment.