Files
windmill/.github/workflows/npm_on_release.yml
Ruben FiszelandClaude Opus 5.5 374d9d1c37 chore: publish npm packages with trusted publishing (#12579)
* chore: publish the client and cli with npm trusted publishing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: drop the npm token script and pass the client's access level

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 15:49:14 +01:00

54 lines
1.6 KiB
YAML

name: Publish typescript-client & CLI to NPM on release
on:
push:
tags:
- "v*"
workflow_dispatch:
# Every job publishes by npm trusted publishing (OIDC). npm accepts it only from GitHub-hosted
# runners with npm >= 11.5.1, and matches this file name and the `npm` environment: changing
# any of these breaks releases, there is no token to fall back on.
jobs:
publish_typescript_client:
runs-on: ubuntu-latest
environment: npm
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4.4.0
- uses: actions/setup-node@v7.1.0
with:
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- run: cd typescript-client && ./publish.sh --access=public && cd ..
publish_chat_sdk:
runs-on: ubuntu-latest
environment: npm
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4.4.0
- uses: actions/setup-node@v7.1.0
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: ubuntu-latest
environment: npm
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4.4.0
- uses: actions/setup-node@v7.1.0
with:
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- uses: oven-sh/setup-bun@v2.2.0
with:
bun-version: latest
- run: cd cli && ./build.sh && cd npm && npm publish --access public