Skip to content

Commit c2e8a34

Browse files
committed
ci: generate and release individually
1 parent 4e284b1 commit c2e8a34

File tree

7 files changed

+141
-1
lines changed

7 files changed

+141
-1
lines changed

.github/workflows/generate.yaml renamed to .github/workflows/sdk_generation_api_go.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Generate
1+
name: Generate API-GO
22
permissions:
33
checks: write
44
contents: write
@@ -24,6 +24,8 @@ jobs:
2424
force: ${{ github.event.inputs.force }}
2525
mode: pr
2626
set_version: ${{ github.event.inputs.set_version }}
27+
target: api-go
2728
secrets:
2829
github_access_token: ${{ secrets.GITHUB_TOKEN }}
30+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
2931
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Generate API-PY
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+
jobs:
21+
generate:
22+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
23+
with:
24+
force: ${{ github.event.inputs.force }}
25+
mode: pr
26+
set_version: ${{ github.event.inputs.set_version }}
27+
target: api-py
28+
secrets:
29+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
30+
pypi_token: ${{ secrets.PYPI_TOKEN }}
31+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
32+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Generate API-TS
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+
jobs:
21+
generate:
22+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
23+
with:
24+
force: ${{ github.event.inputs.force }}
25+
mode: pr
26+
set_version: ${{ github.event.inputs.set_version }}
27+
target: api-ts
28+
secrets:
29+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
30+
npm_token: ${{ secrets.NPM_TOKEN }}
31+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
32+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish API-GO
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
id-token: write
8+
"on":
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- api/go/.speakeasy/gen.lock
14+
workflow_dispatch: {}
15+
jobs:
16+
publish:
17+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
18+
with:
19+
target: api-go
20+
secrets:
21+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
22+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish API-PY
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
id-token: write
8+
"on":
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- api/py/.speakeasy/gen.lock
14+
workflow_dispatch: {}
15+
jobs:
16+
publish:
17+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
18+
with:
19+
target: api-py
20+
secrets:
21+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
22+
pypi_token: ${{ secrets.PYPI_TOKEN }}
23+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish API-TS
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
id-token: write
8+
"on":
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- api/ts/.speakeasy/gen.lock
14+
workflow_dispatch: {}
15+
jobs:
16+
publish:
17+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
18+
with:
19+
target: api-ts
20+
secrets:
21+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
22+
npm_token: ${{ secrets.NPM_TOKEN }}
23+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.speakeasy/workflow.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ targets:
2121
target: python
2222
source: api
2323
output: ./api/py
24+
publish:
25+
pypi:
26+
token: $pypi_token
2427
codeSamples:
2528
registry:
2629
location: registry.speakeasyapi.dev/unkey/unkey/api-python-code-samples
@@ -31,6 +34,9 @@ targets:
3134
target: typescript
3235
source: api
3336
output: ./api/ts
37+
publish:
38+
npm:
39+
token: $npm_token
3440
codeSamples:
3541
registry:
3642
location: registry.speakeasyapi.dev/unkey/unkey/api-typescript-code-samples

0 commit comments

Comments
 (0)