-
Notifications
You must be signed in to change notification settings - Fork 15
127 lines (106 loc) · 3.6 KB
/
release-sdks.yaml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: release-sdks
on: [push]
jobs:
fern-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install Dependencies
shell: bash
run: pnpm install
- name: Run fern check
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: pnpm run docs:check
fern-generate-node:
environment: sdk-release
needs: fern-check
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/node@')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
- name: Download Fern
run: npm install -g fern-api
- name: Release TypeScript SDK
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
tag=${{ github.ref_name }}
prefix="node@"
SDK_VERSION="${tag#$prefix}"
fern generate --api sdks --group node-sdk --version "$SDK_VERSION" --log-level debug
fern-generate-go:
environment: sdk-release
needs: fern-check
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/go@')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
- name: Download Fern
run: npm install -g fern-api
- name: Release Go SDK
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
run: |
tag=${{ github.ref_name }}
prefix="go@"
SDK_VERSION="${tag#$prefix}"
fern generate --api sdks --group go-sdk --version "$SDK_VERSION" --log-level debug
fern-generate-java:
environment: sdk-release
needs: fern-check
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/java@')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
- name: Download Fern
run: npm install -g fern-api
- name: Release Java SDK
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_CENTRAL_SECRET_KEY_KEY_ID: ${{ secrets.MAVEN_CENTRAL_SECRET_KEY_KEY_ID }}
MAVEN_CENTRAL_SECRET_KEY_PASSWORD: ${{ secrets.MAVEN_CENTRAL_SECRET_KEY_PASSWORD }}
MAVEN_CENTRAL_SECRET_KEY: ${{ secrets.MAVEN_CENTRAL_SECRET_KEY }}
run: |
tag=${{ github.ref_name }}
prefix="java@"
SDK_VERSION="${tag#$prefix}"
fern generate --api sdks --group java-sdk --version "$SDK_VERSION" --log-level debug
fern-generate-python:
environment: sdk-release
needs: fern-check
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/python@')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
- name: Download Fern
run: npm install -g fern-api
- name: Release Python SDK
env:
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
tag=${{ github.ref_name }}
prefix="python@"
SDK_VERSION="${tag#$prefix}"
fern generate --api sdks --group python-sdk --version "$SDK_VERSION" --log-level debug