Skip to content

Commit 86e447b

Browse files
committed
fix workflow
1 parent 21f5b0e commit 86e447b

File tree

4 files changed

+59
-14
lines changed

4 files changed

+59
-14
lines changed

.github/workflows/node.js.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
branches: [ "main" ]
1111

1212
jobs:
13-
build:
13+
test:
1414

1515
runs-on: ubuntu-latest
1616

@@ -27,12 +27,39 @@ jobs:
2727
node-version: ${{ matrix.node-version }}
2828
cache: 'npm'
2929
- run: |
30-
sudo apt-get -y update
31-
sudo apt-get -y install build-essential
32-
- run: git clone https://github.com/crossdb-org/crossdb.git
33-
- run: cd crossdb
34-
- run: make build
35-
- run: make install
30+
sudo apt-get -y update
31+
sudo apt-get -y install build-essential software-properties-common gcc gdb make
32+
- run: |
33+
git clone https://github.com/crossdb-org/crossdb.git
34+
cd crossdb
35+
make build
36+
sudo make install
37+
cd ..
3638
- run: npm ci
3739
- run: npm run build --if-present
3840
- run: npm test
41+
42+
publish-npm:
43+
needs: test
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-node@v4
48+
with:
49+
node-version: 20
50+
registry-url: https://registry.npmjs.org/
51+
- run: |
52+
sudo apt-get -y update
53+
sudo apt-get -y install build-essential software-properties-common gcc gdb make
54+
- run: |
55+
git clone https://github.com/crossdb-org/crossdb.git
56+
cd crossdb
57+
make build
58+
sudo make install
59+
cd ..
60+
- run: npm ci
61+
- run: npm run build --if-present
62+
- run: npm publish --access public
63+
env:
64+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
65+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
build/
22
node_modules/
3+
.DS_Store

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@croosdb:registry=https://registry.npmjs.org/
2+
scope=@croosdb

package.json

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,35 @@
11
{
2-
"name": "crossdb",
3-
"version": "1.0.0",
2+
"name": "@croosdb/crossdb-nodejs",
3+
"version": "1.2.0",
44
"main": "index.js",
5+
"author": "Efrem Ropelato",
6+
"contributors":[
7+
{
8+
"name": "Efrem Ropelato",
9+
"email": "[email protected]",
10+
"url": "https://efremropelato.github.io/"
11+
}
12+
],
13+
"license": "MIT",
14+
"description": "CroosDB Nodejs driver",
15+
"keywords": [],
516
"gypfile": true,
17+
"repository": {
18+
"type": "git",
19+
"url": "[email protected]:crossdb-org/crossdb-nodejs.git"
20+
},
21+
"bugs": {
22+
"url": "https://github.com/crossdb-org/crossdb-nodejs/issues"
23+
},
624
"scripts": {
725
"test": "node example/index.js",
826
"build:dev": "node-gyp -j 16 build --debug",
927
"build": "node-gyp -j 16 build",
1028
"rebuild:dev": "node-gyp -j 16 rebuild --debug",
1129
"rebuild": "node-gyp -j 16 rebuild",
12-
"clean": "node-gyp clean"
30+
"clean": "node-gyp clean",
31+
"install": "node-gyp rebuild"
1332
},
14-
"keywords": [],
15-
"author": "",
16-
"license": "MIT",
17-
"description": "",
1833
"dependencies": {
1934
"bindings": "^1.5.0",
2035
"node-addon-api": "^8.2.2"

0 commit comments

Comments
 (0)