Skip to content

Release JS SDK

Release JS SDK #32

Workflow file for this run

name: Release JS SDK
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g., 0.3.0 | 0.3.0-beta)'
required: true
type: string
isRCRelease:
description: 'Is this a release candidate release?'
required: true
type: boolean
jobs:
run-js-tests:
permissions:
contents: write
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: js
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install -g pnpm
- name: Install packages in js folder
run: pnpm install --frozen-lockfile
- name: Bump version
run: ./bump_version.sh ${{ github.event.inputs.version }}
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: pnpm build
run: pnpm build
- name: pnpm publish
working-directory: js/dist
run: |
if ${{ github.event.inputs.isRCRelease }}; then
pnpm publish --no-git-checks --tag rc
else
pnpm publish --no-git-checks
fi