Skip to content

Commit a4bf953

Browse files
authored
.speakeasy: Configure pypi publishing (#7)
Using separate livepeer-ai account while I don't get access to the main livepeer account. We can transfer the pakcage between accounts later.
1 parent faa5b8e commit a4bf953

File tree

3 files changed

+54
-30
lines changed

3 files changed

+54
-30
lines changed
Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
name: Generate
22
permissions:
3-
checks: write
4-
contents: write
5-
pull-requests: write
6-
statuses: write
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
77
"on":
8-
workflow_dispatch:
9-
inputs:
10-
force:
11-
description: Force generation of SDKs
12-
type: boolean
13-
default: false
14-
push_code_samples_only:
15-
description: Force push only code samples from SDK generation
16-
type: boolean
17-
default: false
18-
set_version:
19-
description: optionally set a specific SDK version
20-
type: string
21-
schedule:
22-
- cron: 0 0 * * *
8+
workflow_dispatch:
9+
inputs:
10+
force:
11+
description: Force generation of SDKs
12+
type: boolean
13+
default: false
14+
push_code_samples_only:
15+
description: Force push only code samples from SDK generation
16+
type: boolean
17+
default: false
18+
set_version:
19+
description: optionally set a specific SDK version
20+
type: string
21+
schedule:
22+
- cron: 0 0 * * *
2323
jobs:
24-
generate:
25-
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
26-
with:
27-
force: ${{ github.event.inputs.force }}
28-
mode: pr
29-
push_code_samples_only: ${{ fromJSON(github.event.inputs.push_code_samples_only != '' && github.event.inputs.push_code_samples_only || 'false') }}
30-
set_version: ${{ github.event.inputs.set_version }}
31-
speakeasy_version: latest
32-
secrets:
33-
github_access_token: ${{ secrets.GITHUB_TOKEN }}
34-
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
24+
generate:
25+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
26+
with:
27+
force: ${{ github.event.inputs.force }}
28+
mode: pr
29+
push_code_samples_only: ${{ fromJSON(github.event.inputs.push_code_samples_only != '' && github.event.inputs.push_code_samples_only || 'false') }}
30+
set_version: ${{ github.event.inputs.set_version }}
31+
speakeasy_version: latest
32+
secrets:
33+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
34+
pypi_token: ${{ secrets.PYPI_TOKEN }}
35+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.github/workflows/sdk_publish.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Publish
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
"on":
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- RELEASES.md
13+
- '*/RELEASES.md'
14+
jobs:
15+
publish:
16+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
17+
secrets:
18+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
19+
pypi_token: ${{ secrets.PYPI_TOKEN }}
20+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

.speakeasy/workflow.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ targets:
1010
livepeer-ai-python:
1111
target: python
1212
source: livepeer_ai-OAS
13+
publish:
14+
pypi:
15+
token: $pypi_token
1316
codeSamples:
1417
output: codeSamples.yaml
1518
registry:

0 commit comments

Comments
 (0)