Skip to content

Publish to npm (TS)

Publish to npm (TS) #7

Workflow file for this run

name: Publish to npm (TS)
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./ts-sdk
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npm ci
- name: Generate version.ts
run: |
VERSION=$(node -p "require('./package.json').version")
echo "export const SDK_VERSION = '${VERSION}';" > src/version.ts
- name: Build project
run: npm run build --if-present
- name: Run tests
run: npm test --if-present
- name: Copy root LICENSE to ts-sdk
run: cp LICENSE ts-sdk/LICENSE
- name: Publish Package
run: npm publish --access public --tag beta