Skip to content

Commit 6b4065e

Browse files
committed
chore: sync hand-written code from monorepo
Pre-generation commit to establish monorepo state as the base for Speakeasy 3-way merge.
1 parent 7ab9d00 commit 6b4065e

File tree

329 files changed

+20006
-5364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

329 files changed

+20006
-5364
lines changed

.github/actions/validate-sdk/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ runs:
1010
using: 'composite'
1111
steps:
1212
- name: Install pnpm
13-
uses: pnpm/action-setup@v4
13+
uses: pnpm/action-setup@v4.2.0
1414

1515
- name: Setup Node.js
1616
uses: actions/setup-node@v4

.github/workflows/recreate-staging.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
with:
1818
fetch-depth: 0
1919
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Generate
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
id-token: write
8+
"on":
9+
workflow_dispatch:
10+
inputs:
11+
force:
12+
description: Force generation of SDKs
13+
type: boolean
14+
default: false
15+
set_version:
16+
description: optionally set a specific SDK version
17+
type: string
18+
schedule:
19+
- cron: 0 0 * * *
20+
pull_request:
21+
types:
22+
- labeled
23+
- unlabeled
24+
25+
jobs:
26+
generate:
27+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
28+
with:
29+
force: ${{ github.event.inputs.force }}
30+
mode: pr
31+
set_version: ${{ github.event.inputs.set_version }}
32+
secrets:
33+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
34+
npm_token: ${{ secrets.NPM_TOKEN }}
35+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate (spec change merged)
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
id-token: write
8+
"on":
9+
workflow_dispatch:
10+
inputs:
11+
force:
12+
description: Force generation of SDKs
13+
type: boolean
14+
default: false
15+
set_version:
16+
description: optionally set a specific SDK version
17+
type: string
18+
pull_request:
19+
types: [closed]
20+
branches:
21+
- main
22+
paths:
23+
- .speakeasy/in.openapi.yaml
24+
25+
jobs:
26+
generate:
27+
if: github.event.pull_request.merged == true
28+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
29+
with:
30+
force: ${{ github.event.inputs.force }}
31+
mode: direct
32+
set_version: ${{ github.event.inputs.set_version }}
33+
secrets:
34+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
35+
npm_token: ${{ secrets.NPM_TOKEN }}
36+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Run Speakeasy on PR
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
workflow_dispatch:
9+
pull_request:
10+
paths:
11+
- .speakeasy/in.openapi.yaml
12+
13+
jobs:
14+
run-speakeasy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v5
19+
with:
20+
ref: ${{ github.event.pull_request.head.ref }}
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4.2.0
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '22'
30+
cache: 'pnpm'
31+
32+
- name: Install Speakeasy CLI
33+
run: |
34+
curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
35+
# Verify speakeasy command is available
36+
if ! command -v speakeasy &> /dev/null; then
37+
echo "Error: speakeasy command not found after installation"
38+
exit 1
39+
fi
40+
speakeasy --version
41+
42+
- name: Run Speakeasy
43+
run: speakeasy run
44+
env:
45+
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }}
46+
47+
- name: Validate SDK
48+
uses: ./.github/actions/validate-sdk
49+
with:
50+
openrouter-api-key: ${{ secrets.OPENROUTER_API_KEY }}
51+
52+
- name: Auto-commit generated SDK and API docs
53+
uses: int128/update-generated-files-action@v2
54+
with:
55+
# Set a custom message to the new commit (optional)
56+
commit-message: 'Chore: auto-generate SDK and API documentation'

.github/workflows/validation-checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v4
11+
uses: actions/checkout@v5
1212

1313
- name: Validate SDK
1414
uses: ./.github/actions/validate-sdk

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
**/.speakeasy/logs/
2626
.DS_Store
2727
/.speakeasy/reports
28+
/.speakeasy/*.lock
29+
/.speakeasy/*.openapi.yaml
30+
/docs
2831
.env
2932
.env.local
3033
.env.*.local

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
shamefully-hoist=false
2-
strict-peer-dependencies=true
2+
strict-peer-dependencies=false
3+
frozen-lockfile=false

0 commit comments

Comments
 (0)