Fix binary output on stdout #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |