Skip to content
name: Publish Trading Widget Package to npm
on:
release:
types: [ published ]
jobs:
build:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
scope: '@dhedge'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Lint
env:
CI: true
NODE_OPTIONS: '--max_old_space_size=4096'
run: pnpm lint
- name: Run Test
env:
CI: true
NODE_OPTIONS: '--max_old_space_size=4096'
run: pnpm test
- name: Run Build
env:
CI: true
NODE_OPTIONS: '--max_old_space_size=4096'
run: pnpm build
- run: pnpx nx publish trading-widget
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}