1.3.1 #34
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: | |
- "!*" | |
tags: | |
- "v*" | |
jobs: | |
build-wasm: | |
name: Build the source code into WASM | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
- name: Build GMP | |
run: npm run build-gmp | |
- name: Build MPFR | |
run: npm run build-mpfr | |
- name: Build src | |
run: npm run build-src | |
- name: Install JS dependencies | |
run: npm ci | |
- name: Generate gmp.wasm.ts | |
run: npm run build-wasm-ts | |
- name: Build JS library | |
run: npm run build-rollup | |
- name: Build TypeScript types | |
run: npm run build-types | |
- name: Run tests and upload test coverage | |
run: npm test && bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }} | |
- name: Deploy to 'binaries' branch | |
if: success() | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: binaries | |
build_dir: dist | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build docs | |
run: npm run typedoc | |
- name: Deploy docs to 'gh-pages' branch | |
if: success() | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: gh-pages | |
build_dir: docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
- run: npm publish | |
env: | |
CI: true |