File tree 2 files changed +1
-43
lines changed
2 files changed +1
-43
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- master
7
- workflow_dispatch :
8
- inputs :
9
- version :
10
- description : Version
11
- type : string
12
- required : true
13
7
14
8
jobs :
15
9
fern-generate-pr :
27
21
- name : Check Fern API is valid
28
22
run : fern check
29
23
30
- - name : Get version from label-studio-sdk
31
- id : sdk-version
32
- if : inputs.version == ''
33
- uses : actions/github-script@v7
34
- with :
35
- github-token : ${{ secrets.GIT_PAT }}
36
- script : |
37
- const { repo, owner } = context.repo;
38
- const sdk_repo = 'label-studio-sdk';
39
- const pyProjectPath = 'pyproject.toml';
40
-
41
- const {data: sdk_repo_data} = await github.rest.repos.get({
42
- owner,
43
- repo: sdk_repo,
44
- });
45
- const {data: commit} = await github.rest.repos.getCommit({
46
- owner,
47
- repo: sdk_repo,
48
- ref: sdk_repo_data.default_branch,
49
- });
50
- const pyprojectBlob = await github.rest.repos.getContent({
51
- owner,
52
- repo: sdk_repo,
53
- ref: commit.sha,
54
- path: pyProjectPath,
55
- });
56
- const pyproject = Buffer.from(pyprojectBlob.data.content, pyprojectBlob.data.encoding).toString("utf8");
57
- const versionMatch = pyproject.match(/version = "(?<version>[\.a-z0-9]+)"/);
58
- if (versionMatch && versionMatch.groups.version) {
59
- core.setOutput('version', versionMatch.groups.version);
60
- } else {
61
- throw `Version not found in ${pyprojectBlob.url}`
62
- }
63
-
64
24
- name : Publish Python SDK PR
65
25
env :
66
26
FERN_TOKEN : ${{ secrets.FERN_TOKEN }}
67
- run : fern generate --group python-sdk-staging --version ${{ inputs.version || steps.sdk-version.outputs.version }} -- log-level debug
27
+ run : fern generate --group python-sdk-staging --log-level debug
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ groups:
10
10
- public
11
11
generators :
12
12
- name : fernapi/fern-python-sdk
13
- version : 2.14.0-rc0
14
13
output :
15
14
location : pypi
16
15
package-name : label-studio-sdk
@@ -54,7 +53,6 @@ groups:
54
53
- public
55
54
generators :
56
55
- name : fernapi/fern-python-sdk
57
- version : 2.14.0-rc0
58
56
output :
59
57
location : local-file-system
60
58
path : ../label_studio_sdk
You can’t perform that action at this time.
0 commit comments