File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 branches :
44 - ' **'
55 pull_request :
6+ repository_dispatch :
7+ types : [release]
8+ workflow_dispatch :
9+ inputs :
10+ json :
11+ description : Passed json from repository_dispatch
12+ required : true
13+ type : string
14+ version_postfix :
15+ description : Additional string to concatenate onto the existing version before release
16+ required : false
17+ type : string
18+ default : ' '
619 workflow_call :
720 inputs :
821 ref :
1326
1427name : CI
1528
29+ env :
30+ PASSED_VERSION : ${{ (github.event_name == 'repository_dispatch' && github.event.client_payload || fromJSON(inputs.json || '{}'))['version'] }}
31+ VERSION_POSTPEND : ${{ github.event_name == 'workflow_dispatch' && inputs.version_postfix || '' }}
32+
1633jobs :
1734 generate :
1835 runs-on : ubuntu-latest
@@ -28,11 +45,14 @@ jobs:
2845 with :
2946 bundle : openapi-legacy.yaml
3047
48+ - if : env.VERSION_POSTPEND != ''
49+ run : yq '--inplace' ".info.version |= \"${PASSED_VERSION}${VERSION_POSTPEND}\"" openapi-legacy.yaml
50+
3151 - run : bash ./generate.sh openapi-legacy.yaml
3252
3353 - uses : actions/upload-artifact@v7
3454 with :
35- name : generated- java
55+ name : java-generated
3656 path : .
3757 include-hidden-files : true
3858
4565 steps :
4666 - uses : actions/download-artifact@v8
4767 with :
48- name : generated- java
68+ name : java-generated
4969
5070 - uses : actions/setup-java@v5.7.0
5171 with :
5474 cache : maven
5575
5676 - run : mvn -B package --no-transfer-progress
77+
78+ publish :
79+ needs :
80+ - generate
81+ - test
82+ if : github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch'
83+ runs-on : ubuntu-latest
84+ steps :
85+ - uses : actions/checkout@v7
86+
87+ - uses : actions/download-artifact@v8
88+ with :
89+ name : java-generated
90+
91+ - run : rm -f openapi-legacy.yaml
92+
93+ - uses : JamesIves/github-pages-deploy-action@v4.9.0
94+ with :
95+ branch : main
96+ folder : .
97+ commit-message : Upgrade Java SDK to spec ${{ env.PASSED_VERSION }}${{ env.VERSION_POSTPEND }}
98+ tag : ${{ env.PASSED_VERSION }}${{ env.VERSION_POSTPEND }}
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments