Skip to content

Build and publish JS library #66

Build and publish JS library

Build and publish JS library #66

name: Build and publish JS library
on:
release:
types: [published]
tags-ignore:
- fdp-contracts-main*
workflow_dispatch:
jobs:
publish-library:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# these if statements ensure that a publication only occurs when
# a new release is created:
- uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci --prefix js-library
- run: cd js-library && npm run ci:test && cd ..
- run: npm run build --prefix js-library
- run: cd js-library && npm publish --access public && cd ..
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}