Skip to content

Commit 60a1e90

Browse files
author
Genevieve Nuebel
committed
Update workflow files for latest directory migration
1 parent 9d3de85 commit 60a1e90

5 files changed

Lines changed: 23 additions & 18 deletions

File tree

.github/workflows/generate.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff 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

.github/workflows/generate_publish_release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ jobs:
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

.github/workflows/on-push-master.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@ on:
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

2010
jobs:
2111
Publish:

.github/workflows/publish.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
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

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
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 }}"

0 commit comments

Comments
 (0)