-
Notifications
You must be signed in to change notification settings - Fork 9
59 lines (49 loc) · 1.53 KB
/
npm-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- name: Startup Nebula
run: |
cd ./.nebula-up
rm -rf ./data ./log
docker-compose up -d
echo "Sleep 20s for waiting nebula cluster"
sleep 20
./check.sh
echo "Create space nebula_node"
./console.sh -e "create space nebula_node(vid_type = FIXED_STRING(30));"
echo "Sleep 10s for space creating"
sleep 10
./console.sh -f /root/init-create.ngql
echo "Sleep 30s for schema creating"
sleep 30
./console.sh -f /root/init-data.ngql
cd ..
- name: Build
run: |
npm install --unsafe-perm
npm run build
- name: Unit Test
run: |
npm run test
- name: Publish NPM
run: |
cd dist
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}