Files
windmill/.github/workflows/npm_on_release.yml
T
hugocasa b57fd3e29a chore: publish the chat sdk as @windmill-labs/chat-sdk (#11686)
* chore: publish the chat sdk as @windmill-labs/chat-sdk

* chore: publish the chat sdk with a dedicated npm token

* chore: publish the chat sdk with npm trusted publishing
2026-10-13 09:27:24 +02:00

48 lines
1.5 KiB
YAML

name: Publish typescript-client & CLI to NPM on release
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish_typescript_client:
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v7
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: cd typescript-client && ./publish.sh --access public && cd ..
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish_chat_sdk:
# Published by npm trusted publishing (OIDC), which npm accepts only from
# GitHub-hosted runners and npm >= 11.5.1: keep both, there is no token to fall back on.
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v7
with:
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- run: cd chat-sdk && npm ci && npm run build && npm publish --access public
publish_cli:
runs-on: ubicloud-standard-8
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v7
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: cd cli && ./build.sh && cd npm && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}