-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (38 loc) · 1021 Bytes
/
ci-workflow.yaml
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
name: emscripten CI
on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
jobs:
build-emscripten:
runs-on: ubuntu-latest
steps:
- uses: mymindstorm/setup-emsdk@v14
with:
version: '3.1.56'
- uses: actions/checkout@v4
- name: verify
run: emcc -v
- name: configure
run: emcmake cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: build
run: cmake --build build
- name: pack
run: npm pack
- name: upload artifact
uses: actions/upload-artifact@v4
with:
path: ldbdump-*.tgz
- uses: actions/setup-node@v4
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: publish to npm
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: npm publish ldbdump-*.tgz