Build and publish JS library #66
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 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}} |