TypeScript SDK: building automatically via workflow (#3820)

This commit is contained in:
Stanislav Novosad
2025-10-24 19:47:53 -06:00
committed by GitHub
parent 2f87e3ab48
commit ad2ed92e99
9 changed files with 3619 additions and 8 deletions

65
.github/workflows/ts-sdk-release.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: Build Skyvern TS SDK and publish to npm
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'skyvern-ts/client/package.json'
jobs:
check-version-change:
runs-on: ubuntu-latest
outputs:
version_changed: ${{ steps.check.outputs.version_changed }}
current_version: ${{ steps.check.outputs.current_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if version changed
id: check
run: |
# Get version from current package.json
CURRENT_VERSION=$(node -p "require('./skyvern-ts/client/package.json').version")
# Get version from previous commit
git checkout HEAD^1
PREVIOUS_VERSION=$(node -p "require('./skyvern-ts/client/package.json').version")
git checkout -
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
echo "Version changed from $PREVIOUS_VERSION to $CURRENT_VERSION"
echo "version_changed=true" >> $GITHUB_OUTPUT
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
else
echo "Version remained at $CURRENT_VERSION"
echo "version_changed=false" >> $GITHUB_OUTPUT
echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
fi
build-and-publish-sdk:
runs-on: ubuntu-latest
needs: check-version-change
if: needs.check-version-change.outputs.version_changed == 'true' || github.event_name == 'workflow_dispatch'
defaults:
run:
working-directory: ./skyvern-ts/client
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: Build CJS
run: npx tsc --project ./tsconfig.cjs.json
- name: Build ESM
run: npx tsc --project ./tsconfig.esm.json
- name: Rename ESM files
run: node scripts/rename-to-esm-files.js dist/esm
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@@ -1,6 +1,6 @@
[project]
name = "skyvern"
version = "0.2.19"
version = "0.2.20"
description = ""
authors = [{ name = "Skyvern AI", email = "info@skyvern.com" }]
requires-python = ">=3.11,<3.14"

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
fern generate --group python-sdk --log-level debug --preview
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
fern generate --group python-sdk --log-level debug --version "$CURRENT_VERSION" --preview
cp -rf fern/.preview/fern-python-sdk/src/skyvern/* skyvern/client/

View File

@@ -1,4 +1,12 @@
#!/usr/bin/env bash
fern generate --group ts-sdk --log-level debug --preview
CURRENT_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
fern generate --group ts-sdk --log-level debug --version "$CURRENT_VERSION" --preview
(cd fern/.preview/fern-typescript-sdk \
&& npm install \
&& npx tsc --project ./tsconfig.cjs.json \
&& npx tsc --project ./tsconfig.esm.json \
&& node scripts/rename-to-esm-files.js dist/esm)
cp -rf fern/.preview/fern-typescript-sdk/* skyvern-ts/client/

3537
skyvern-ts/client/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@skyvern/client",
"version": "0.2.19",
"version": "0.2.20",
"private": false,
"repository": "github:Skyvern-AI/skyvern-typescript",
"type": "commonjs",

View File

@@ -26,8 +26,8 @@ export class SkyvernClient {
"x-api-key": _options?.apiKey,
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@skyvern/client",
"X-Fern-SDK-Version": "0.2.19",
"User-Agent": "@skyvern/client/0.2.19",
"X-Fern-SDK-Version": "0.2.20",
"User-Agent": "@skyvern/client/0.2.20",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},

View File

@@ -1 +1 @@
export const SDK_VERSION = "0.2.19";
export const SDK_VERSION = "0.2.20";

2
uv.lock generated
View File

@@ -5482,7 +5482,7 @@ wheels = [
[[package]]
name = "skyvern"
version = "0.2.19"
version = "0.2.20"
source = { editable = "." }
dependencies = [
{ name = "aioboto3" },