File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,15 +27,21 @@ jobs:
2727 run : echo "::set-output name=version::$(ruby .github/version.rb ${{ github.event.inputs.version_level }})"
2828 - name : Clean repo
2929 run : ruby .github/clean.rb
30- - name : Install openapi-generator-cli
30+ - name : Install openapi-generator-cli and Generate SDK
3131 run : |
3232 npm install @openapitools/openapi-generator-cli -g
3333 - run : |
3434 openapi-generator-cli generate \
3535 -i https://raw.githubusercontent.com/mxenabled/openapi/master/openapi/mx_platform_api.yml \
3636 -g typescript-axios \
3737 -c ./openapi/config.yml \
38- -t ./openapi/templates
38+ -t ./openapi/templates \
39+ -o ./latest
40+ - name : Copy documentation to latest
41+ run : |
42+ cp LICENSE ./latest/LICENSE
43+ cp CHANGELOG.md ./latest/CHANGELOG.md
44+ cp MIGRATION.md ./latest/MIGRATION.md
3945 - name : Create branch
4046 run : git checkout -b "openapi-generator-${{ steps.bump_version.outputs.version }}"
4147 - name : Create commit
Original file line number Diff line number Diff line change 2828 -i https://raw.githubusercontent.com/mxenabled/openapi/master/openapi/mx_platform_api.yml \
2929 -g typescript-axios \
3030 -c ./openapi/config.yml \
31- -t ./openapi/templates
31+ -t ./openapi/templates \
32+ -o ./latest
33+ - name : Copy documentation to latest
34+ run : |
35+ cp LICENSE ./latest/LICENSE
36+ cp CHANGELOG.md ./latest/CHANGELOG.md
37+ cp MIGRATION.md ./latest/MIGRATION.md
3238 - name : Checkout master
3339 run : git checkout master
3440 - name : Create commit
Original file line number Diff line number Diff line change 44 push :
55 branches : [master]
66 paths :
7- # Root-level SDK files (current structure)
8- # Only trigger publish/release when SDK code changes
9- - ' api.ts'
10- - ' base.ts'
11- - ' common.ts'
12- - ' configuration.ts'
13- - ' index.ts'
14- - ' package.json'
15- - ' tsconfig.json'
16- - ' tsconfig.esm.json'
17- - ' dist/**'
18- - ' .openapi-generator/**'
7+ # Latest version SDK files
8+ - ' latest/**'
199
2010jobs :
2111 Publish :
Original file line number Diff line number Diff line change 1515 with :
1616 node-version : " 20.x"
1717 registry-url : " https://registry.npmjs.org"
18- - run : npm install
19- - run : npm publish
18+ - name : Install and Publish
19+ working-directory : ./latest
20+ run : |
21+ npm install
22+ npm publish --tag next
2023 env :
2124 NODE_AUTH_TOKEN : ${{secrets.NPM_AUTH_TOKEN}}
2225 - name : Slack notification
Original file line number Diff line number Diff line change 1717 ruby-version : 3.1
1818 - name : Read version
1919 id : read_version
20- run : echo "::set-output name=version::$(ruby .github/ version.rb )"
20+ run : echo "::set-output name=version::$(jq -r '. version' ./latest/package.json )"
2121 - name : Create tag and release
2222 run : |
2323 gh release create "v${{ steps.read_version.outputs.version }}"
You can’t perform that action at this time.
0 commit comments