Skip to content

v1.13.0

v1.13.0 #284

# This workflow publishes packages to npm using trusted publishing
# It triggers on release creation to publish production packages
# It can also be manually triggered to publish alpha/canary packages
name: Publish Packages
on:
release:
types: [created]
workflow_dispatch:
inputs:
preid:
description: 'Preid used to publish package. Must be unique per branch.'
required: true
default: 'alpha'
ref:
description: 'Commit to deploy from. Defaults to branch used for workflow_dispatch action.'
required: false
default: ''
jobs:
publish-packages:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build production
run: npm run build
- name: Publish canary packages
if: ${{ github.event_name == 'workflow_dispatch' }}
run: ./node_modules/.bin/lerna publish --canary --force-publish=\* --preid ${{ github.event.inputs.preid }} --dist-tag canary --yes
- name: Publish production packages
if: ${{ github.event_name == 'release' }}
run: ./node_modules/.bin/lerna publish from-package --yes
- name: Update deephaven-core
if: ${{ github.event_name == 'release' }}
run: |
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.DEEPHAVENINTERNAL_PUBLIC_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/deephaven/deephaven-core/actions/workflows/update-web.yml/dispatches --data '{"ref": "main"}'