Skip to content

Commit f6816a3

Browse files
fern-supportjsklanmattblank11
authored
Add python-sdk generator to fern/generators.yml (#271)
* add python sdk generator * update preview target, add fern/.preview to gitignore * Add pydantic config * change target and add github workflow --------- Co-authored-by: jsklan <[email protected]> Co-authored-by: Matt Blank <[email protected]>
1 parent 74562e2 commit f6816a3

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.github/workflows/python-sdk.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Python SDK
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "The version of the SDK that you would like to release"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup node
19+
uses: actions/setup-node@v4
20+
21+
- name: Download Fern
22+
run: npm install -g fern-api
23+
24+
- name: Release SDKs
25+
env:
26+
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
27+
FERN_PYPI_TOKEN: ${{ secrets.FERN_PYPI_TOKEN }}
28+
run: |
29+
fern generate --group python-sdk --version ${{ inputs.version }} --log-level debug

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ compiled/
1414

1515
# Rubymine
1616
.idea
17+
18+
# Fern preview files
19+
/fern/.preview

fern/generators.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,20 @@ groups:
6464
client-class-name: Intercom
6565
inline-path-parameters: true
6666
enable-forward-compatible-enums: true
67+
68+
python-sdk:
69+
generators:
70+
- name: fernapi/fern-python-sdk
71+
version: 4.22.0
72+
github:
73+
mode: pull-request
74+
repository: intercom/intercom-python
75+
config:
76+
client_class_name: Intercom
77+
pydantic_config:
78+
skip_validation: true
79+
output:
80+
location: pypi
81+
package-name: 'intercom-python'
82+
token: ${FERN_PYPI_TOKEN}
83+

0 commit comments

Comments
 (0)