forked from dyne/Zenroom
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (70 loc) · 1.91 KB
/
javascript.yml
File metadata and controls
74 lines (70 loc) · 1.91 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and upload nightly to NPM
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'examples/**'
- '*.md'
pull_request:
env:
EM_VERSION: latest
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: bindings/javascript
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: mymindstorm/setup-emsdk@v7
with:
version: ${{env.EM_VERSION}}
- run: emcc -v
- name: Install zsh
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install zsh
- run: yarn
- run: yarn build
env:
EMSCRIPTEN: ${{env.EMSDK}}/upstream/emscripten
- run: yarn test
- name: Run crypto tests
working-directory: ./
run: make check-js
publish:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
defaults:
run:
working-directory: bindings/javascript
needs: test
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: 'https://registry.npmjs.org'
- uses: mymindstorm/setup-emsdk@v7
with:
version: ${{env.EM_VERSION}}
- name: Install zsh
if: runner.os == 'Linux'
run: sudo apt-get update; sudo apt-get install zsh
- run: yarn
- run: yarn build
env:
EMSCRIPTEN: ${{ env.EMSDK }}/upstream/emscripten
- name: Run yarn version to zenroom@next
run: yarn version --new-version $(npm show zenroom version)-$(git rev-parse --short HEAD) --no-git-tag-version
- run: npm publish . --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}