This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Repository navigation
82 lines (66 loc) · 2.16 KB
/
Copy pathpublish-typescript-sdk.yml
File metadata and controls
82 lines (66 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Publish TypeScript SDK to NPM and JSR
on:
workflow_dispatch:
inputs:
version:
description: "Version to publish (e.g., 1.0.0)"
required: true
type: string
jobs:
build-and-publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: https://registry.npmjs.org
- name: Install dependencies
working-directory: generated-sdks/typescript
run: npm install
- name: Update version in package.json
working-directory: generated-sdks/typescript
run: |
sed -i "s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.version }}\"/g" package.json
cat package.json
- name: Build package
run: npm run build
working-directory: generated-sdks/typescript
- name: Publish to NPM
working-directory: generated-sdks/typescript
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build-and-publish-jsr:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Set up Node.js (for build)
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
working-directory: generated-sdks/typescript
run: npm install
- name: Update version in deno.json
working-directory: generated-sdks/typescript
run: |
sed -i "s/\"version\": \".*\"/\"version\": \"${{ github.event.inputs.version }}\"/g" deno.json
cat deno.json
- name: Build package
working-directory: generated-sdks/typescript
run: npm run build
- name: Publish to JSR
working-directory: generated-sdks/typescript
run:
deno publish --allow-slow-types --unstable-sloppy-imports --allow-dirty