Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/publish_typescript_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Publish TypeScript SDK
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Release tag to publish, for example sdk-v-v0.2.0
required: true
type: string

permissions:
contents: read
Expand All @@ -11,8 +17,14 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Resolve release tag
id: release-tag
run: echo "tag=${{ github.event.release.tag_name || inputs.tag }}" >> "$GITHUB_OUTPUT"

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ steps.release-tag.outputs.tag }}

- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -28,7 +40,7 @@ jobs:
- name: Check release tag matches SDK version
id: tag-check
run: |
tag="${{ github.event.release.tag_name }}"
tag="${{ steps.release-tag.outputs.tag }}"
version="${{ steps.sdk-version.outputs.version }}"
if [[ "$tag" == "v$version" || "$tag" == "sdk-v$version" || "$tag" == "$version" || "$tag" == "sdk-v-v$version" ]]; then
echo "publish=true" >> "$GITHUB_OUTPUT"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release_please_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,50 @@ on:

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: .release-please-config.json
manifest-file: .release-please-manifest.json

- name: Checkout
if: ${{ steps.release.outputs['sdks/typescript-sdk--release_created'] == 'true' }}
uses: actions/checkout@v4

- name: Setup Node
if: ${{ steps.release.outputs['sdks/typescript-sdk--release_created'] == 'true' }}
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org/
cache: npm
cache-dependency-path: sdks/typescript-sdk/package-lock.json

- name: Install dependencies
if: ${{ steps.release.outputs['sdks/typescript-sdk--release_created'] == 'true' }}
working-directory: sdks/typescript-sdk
run: npm ci

- name: Build
if: ${{ steps.release.outputs['sdks/typescript-sdk--release_created'] == 'true' }}
working-directory: sdks/typescript-sdk
run: npm run build

- name: Test
if: ${{ steps.release.outputs['sdks/typescript-sdk--release_created'] == 'true' }}
working-directory: sdks/typescript-sdk
run: npm test -- --run

- name: Publish
if: ${{ steps.release.outputs['sdks/typescript-sdk--release_created'] == 'true' }}
working-directory: sdks/typescript-sdk
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23 changes: 22 additions & 1 deletion .release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,28 @@
"tag-separator": "-",
"include-component-in-tag": true,
"component": "sdk-v",
"extra-files": []
"extra-files": [
{
"type": "json",
"path": "package-lock.json",
"jsonpath": "$.packages['sdks/typescript-sdk'].version"
},
{
"type": "json",
"path": "packages/mcp/package.json",
"jsonpath": "$.dependencies['@terminal49/sdk']"
},
{
"type": "json",
"path": "package-lock.json",
"jsonpath": "$.packages['packages/mcp'].dependencies['@terminal49/sdk']"
},
{
"type": "json",
"path": "packages/mcp/package-lock.json",
"jsonpath": "$.packages[''].dependencies['@terminal49/sdk']"
}
]
}
}
}
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"sdks/typescript-sdk": "0.1.0"
"sdks/typescript-sdk": "0.2.0"
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/mcp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"dependencies": {
"@modelcontextprotocol/sdk": "^1.26.0",
"@terminal49/sdk": "^0.1.0",
"@terminal49/sdk": "0.2.0",
"zod": "^4.3.6"
},
"devDependencies": {
Expand Down
7 changes: 7 additions & 0 deletions sdks/typescript-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to `@terminal49/sdk` are documented here.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0](https://github.com/Terminal49/API/compare/sdk-v-v0.1.0...sdk-v-v0.2.0) (2026-05-07)


### Features

* **sdk:** add TypeScript SDK + SDK Docs ([#174](https://github.com/Terminal49/API/issues/174)) ([e49ed54](https://github.com/Terminal49/API/commit/e49ed54c9918a8769ad007b0d90973c844d60372))

## [Unreleased]

### Added
Expand Down
4 changes: 2 additions & 2 deletions sdks/typescript-sdk/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions sdks/typescript-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"name": "@terminal49/sdk",
"version": "0.1.0",
"version": "0.2.0",
"description": "Terminal49 TypeScript SDK (JSON:API, openapi-fetch)",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": "./dist/index.js",
"./client": "./dist/client.js"
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./client": {
"types": "./dist/client.d.ts",
"default": "./dist/client.js"
}
},
"scripts": {
"build": "tsc",
Expand Down