Skip to content

Commit

Permalink
Merge pull request #165 from guansss/patch-1
Browse files Browse the repository at this point in the history
ci: submit ts client to maa-copilot-client-ts
  • Loading branch information
Handiwork authored Mar 2, 2024
2 parents 936f65c + 04e546e commit 1f9ad19
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,34 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: ts-client
path: ./build/clients/ts-fetch-client/*
path: ./build/clients/ts-fetch-client/*

- name: Checkout maa-copilot-client-ts
uses: actions/checkout@v4
with:
repository: MaaAssistantArknights/maa-copilot-client-ts
path: maa-copilot-client-ts

- name: Copy ts client into maa-copilot-client-ts
run: |
cp -f build/clients/ts-fetch-client/* maa-copilot-client-ts/
- name: Create PR to maa-copilot-client-ts
id: cpr
uses: peter-evans/create-pull-request@v6
with:
path: maa-copilot-client-ts
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
commit-message: 'release: ${{ steps.version.outputs.version }}'
title: 'release: ${{ steps.version.outputs.version }}'
body: https://github.com/MaaAssistantArknights/MaaBackendCenter/actions/runs/${{ github.run_id }}
branch: ts-client
delete-branch: true

- name: Tag previous commit with version
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
cd maa-copilot-client-ts
git checkout ts-client
git tag ${{ steps.version.outputs.version }}
git push --tags
5 changes: 3 additions & 2 deletions client-config/ts-fetch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"npmName": "maa-copilot-client",
"npmVersion": "1.0.0",
"modelPropertyNaming": "camelCase"
}
"modelPropertyNaming": "camelCase",
"supportsES6": true
}

0 comments on commit 1f9ad19

Please sign in to comment.