Skip to content

feat: add CI

feat: add CI #6

Workflow file for this run

name: Project build
on:
pull_request:
release:
types: [released]
jobs:
build:
name: ${{ github.event_name == 'release' && 'Build and release' || 'Build' }} the project
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Setup Emscripten SDK
uses: mymindstorm/setup-emsdk@v14
- name: Checkout the repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Print used libsodium revision
run: |
git -C libsodium rev-parse HEAD
- name: Build libsodium for WASM
run: ./scripts/build-libsodium.sh
- name: Package the project
run: |
mkdir -p ${{ runner.temp }}/gha-dist
npm pack . --pack-destination ${{ runner.temp }}/gha-dist/
- name: Upload the package as an artifact
uses: actions/upload-artifact@v4
with:
name: packaged-tarball
path:
${{ runner.temp }}/gha-dist/*.tgz
- name: Publish the package to NPM
if: github.event_name == 'release'
run: npm publish --provenance