Skip to content

Commit

Permalink
Merge pull request #170 from guansss/patch-4
Browse files Browse the repository at this point in the history
ci: directly push changes to maa-copilot-client-ts
  • Loading branch information
Handiwork authored Mar 12, 2024
2 parents 0b5a59e + a71cbeb commit 50fcf4f
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,27 +107,18 @@ jobs:
path: maa-copilot-client-ts
token: ${{ secrets.TS_CLIENT_PAT }}

- name: Copy ts client into maa-copilot-client-ts
- name: Update maa-copilot-client-ts and push to remote
run: |
cp -rf build/clients/ts-fetch-client/* maa-copilot-client-ts/
cd 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
token: ${{ secrets.TS_CLIENT_PAT }}
git diff --quiet && exit 0
- name: Tag previous commit with version
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
cd maa-copilot-client-ts
git checkout ts-client
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "release: ${{ steps.version.outputs.version }}"\
-m "Generated from https://github.com/MaaAssistantArknights/MaaBackendCenter/actions/runs/${{ github.run_id }}"
git tag ${{ steps.version.outputs.version }}
git push
git push --tags

0 comments on commit 50fcf4f

Please sign in to comment.