From 7e584ad3f0a7a2f0ae8a19c4ad477a6366d285a4 Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Thu, 20 Apr 2023 15:38:13 +0800 Subject: [PATCH 1/2] fix: :bug: have a try --- .github/workflows/uploadtome.yml | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/uploadtome.yml diff --git a/.github/workflows/uploadtome.yml b/.github/workflows/uploadtome.yml new file mode 100644 index 0000000..39ed7d4 --- /dev/null +++ b/.github/workflows/uploadtome.yml @@ -0,0 +1,75 @@ +name: "upload_deploy" + +############################################################################### +# This ci is skipped in THUAI6 for THUAI6 use cloud disk to distribute. +# To use automatically distribution, comment out `if: false` in the following +# two jobs. +############################################################################### + +on: + push: + branches: [ new ] + +jobs: + build_upload: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup dotnet Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.9.2' + architecture: 'x64' + + - name: Pip Install paramiko + run: pip install paramiko + + - name: Publish + run: | + mkdir -p THUAI6/win/win64 + mkdir -p THUAI6/linux/linux64 + mkdir -p THUAI6/win/win64/Debug + mkdir -p THUAI6/linux/linux64/Debug + dotnet publish "./logic/Server/Server.csproj" -c Release -r linux-x64 -o ./THUAI6/win/win64 --self-contained true + dotnet publish "./logic/Server/Server.csproj" -c Release -r win-x64 -o ./THUAI6/linux/linux64 --self-contained true + dotnet publish "./logic/Server/Server.csproj" -c Debug -r win-x64 -o ./THUAI6/win/win64/Debug --self-contained true + dotnet publish "./logic/Server/Server.csproj" -c Debug -r linux-x64 -o ./THUAI6/linux/linux64/Debug --self-contained true + dotnet publish "./logic/Client/Client.csproj" -c Release -r win-x64 -o ./THUAI6/win/win64 --self-contained true + + - name: Copy CAPI + run: | + mkdir -p THUAI6/win/CAPI/proto + cp ./dependency/proto/Message2Clients.proto ./THUAI6/win/CAPI/proto/ + cp ./dependency/proto/Message2Server.proto ./THUAI6/win/CAPI/proto/ + cp ./dependency/proto/Services.proto ./THUAI6/win/CAPI/proto/ + cp ./dependency/proto/MessageType.proto ./THUAI6/win/CAPI/proto/ + cp -r ./CAPI/cpp ./THUAI6/win/CAPI/ + cp -r ./CAPI/python ./THUAI6/win/CAPI/ + cp -r ./THUAI6/win/CAPI ./THUAI6/linux/ + + - name: Copy shell + run: | + cp -r ./CAPI/cmd/* ./THUAI6/win/ + cp -r ./CAPI/shell/* ./THUAI6/linux/ + + - name: Copy Markdown + run: | + mkdir -p ./Md/ + cp ./CAPI/CAPI接口(cpp).md ./Md/ + cp ./CAPI/CAPI接口(python).md ./Md/ + cp ./CAPI/Tool_tutorial.md ./Md/ + cp ./QandA.md ./Md/ + cp ./使用文档.md ./Md/ + cp ./logic/GameRules.md ./Md/ + + - name: Create PDF + uses: mkrakowitzer/actions-makepdfs@v1.3 + with: + markdown_dir: ./Md + output_dir: ./THUAI6/ From 7ba34bb204fb149524029ae29979f115070c172e Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Thu, 20 Apr 2023 16:46:54 +0800 Subject: [PATCH 2/2] ci: :green_heart: fix CI --- .github/workflows/upload_COS.yml | 38 ++++++---------- .github/workflows/uploadtome.yml | 75 -------------------------------- 2 files changed, 13 insertions(+), 100 deletions(-) delete mode 100644 .github/workflows/uploadtome.yml diff --git a/.github/workflows/upload_COS.yml b/.github/workflows/upload_COS.yml index 67737d2..23d59bb 100644 --- a/.github/workflows/upload_COS.yml +++ b/.github/workflows/upload_COS.yml @@ -29,18 +29,22 @@ jobs: - name: Pip Install paramiko run: pip install paramiko + # mkdir -p THUAI6\linux\linux64 + # mkdir -p THUAI6\linux\linux64\Debug + # dotnet publish ".\logic\Server\Server.csproj" -c Release -r linux-x64 -o .\THUAI6\linux\linux64 --self-contained true + # dotnet publish ".\logic\Server\Server.csproj" -c Debug -r linux-x64 -o .\THUAI6\linux\linux64\Debug --self-contained true + - name: Publish run: | - mkdir -p THUAI6\win\win64 - mkdir -p THUAI6\linux\linux64 + mkdir -p THUAI6\win\win64 mkdir -p THUAI6\win\win64\Debug - mkdir -p THUAI6\linux\linux64\Debug - dotnet publish ".\logic\Server\Server.csproj" -c Release -r linux-x64 -o .\THUAI6\win\win64 --self-contained true - dotnet publish ".\logic\Server\Server.csproj" -c Release -r win-x64 -o .\THUAI6\linux\linux64 --self-contained true + + dotnet publish ".\logic\Server\Server.csproj" -c Release -r win-x64 -o .\THUAI6\win\win64 --self-contained true dotnet publish ".\logic\Server\Server.csproj" -c Debug -r win-x64 -o .\THUAI6\win\win64\Debug --self-contained true - dotnet publish ".\logic\Server\Server.csproj" -c Debug -r linux-x64 -o .\THUAI6\linux\linux64\Debug --self-contained true dotnet publish ".\logic\Client\Client.csproj" -c Release -r win-x64 -o .\THUAI6\win\win64 --self-contained true + # cp -r .\THUAI6\win\CAPI .\THUAI6\linux\ + - name: Copy CAPI run: | mkdir -p THUAI6\win\CAPI\proto @@ -50,28 +54,12 @@ jobs: cp .\dependency\proto\MessageType.proto .\THUAI6\win\CAPI\proto\ cp -r .\CAPI\cpp .\THUAI6\win\CAPI\ cp -r .\CAPI\python .\THUAI6\win\CAPI\ - cp -r .\THUAI6\win\CAPI .\THUAI6\linux\ + + # cp -r .\CAPI\shell\* .\THUAI6\linux\ - name: Copy shell run: | cp -r .\CAPI\cmd\* .\THUAI6\win\ - cp -r .\CAPI\shell\* .\THUAI6\linux\ - - - name: Copy Markdown - run: | - mkdir -p .\Md\ - cp .\CAPI\CAPI接口(cpp).md .\Md\ - cp .\CAPI\CAPI接口(python).md .\Md\ - cp .\CAPI\Tool_tutorial.md .\Md\ - cp .\QandA.md .\Md\ - cp .\使用文档.md .\Md\ - cp .\logic\GameRules.md .\Md\ - - - name: Create PDF - uses: mkrakowitzer/actions-makepdfs@v1.3 - with: - markdown_dir: ./Md - output_dir: ./THUAI6/ - name: Tencent Cloud COS Action uses: TencentCloud/cos-action@v1 @@ -82,4 +70,4 @@ jobs: cos_region: ${{ secrets.COS_REGION }} local_path: .\THUAI6 remote_path: THUAI6 - clean: true + clean: true \ No newline at end of file diff --git a/.github/workflows/uploadtome.yml b/.github/workflows/uploadtome.yml deleted file mode 100644 index 39ed7d4..0000000 --- a/.github/workflows/uploadtome.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: "upload_deploy" - -############################################################################### -# This ci is skipped in THUAI6 for THUAI6 use cloud disk to distribute. -# To use automatically distribution, comment out `if: false` in the following -# two jobs. -############################################################################### - -on: - push: - branches: [ new ] - -jobs: - build_upload: - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup dotnet Core - uses: actions/setup-dotnet@v3 - with: - dotnet-version: 6.0.x - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.9.2' - architecture: 'x64' - - - name: Pip Install paramiko - run: pip install paramiko - - - name: Publish - run: | - mkdir -p THUAI6/win/win64 - mkdir -p THUAI6/linux/linux64 - mkdir -p THUAI6/win/win64/Debug - mkdir -p THUAI6/linux/linux64/Debug - dotnet publish "./logic/Server/Server.csproj" -c Release -r linux-x64 -o ./THUAI6/win/win64 --self-contained true - dotnet publish "./logic/Server/Server.csproj" -c Release -r win-x64 -o ./THUAI6/linux/linux64 --self-contained true - dotnet publish "./logic/Server/Server.csproj" -c Debug -r win-x64 -o ./THUAI6/win/win64/Debug --self-contained true - dotnet publish "./logic/Server/Server.csproj" -c Debug -r linux-x64 -o ./THUAI6/linux/linux64/Debug --self-contained true - dotnet publish "./logic/Client/Client.csproj" -c Release -r win-x64 -o ./THUAI6/win/win64 --self-contained true - - - name: Copy CAPI - run: | - mkdir -p THUAI6/win/CAPI/proto - cp ./dependency/proto/Message2Clients.proto ./THUAI6/win/CAPI/proto/ - cp ./dependency/proto/Message2Server.proto ./THUAI6/win/CAPI/proto/ - cp ./dependency/proto/Services.proto ./THUAI6/win/CAPI/proto/ - cp ./dependency/proto/MessageType.proto ./THUAI6/win/CAPI/proto/ - cp -r ./CAPI/cpp ./THUAI6/win/CAPI/ - cp -r ./CAPI/python ./THUAI6/win/CAPI/ - cp -r ./THUAI6/win/CAPI ./THUAI6/linux/ - - - name: Copy shell - run: | - cp -r ./CAPI/cmd/* ./THUAI6/win/ - cp -r ./CAPI/shell/* ./THUAI6/linux/ - - - name: Copy Markdown - run: | - mkdir -p ./Md/ - cp ./CAPI/CAPI接口(cpp).md ./Md/ - cp ./CAPI/CAPI接口(python).md ./Md/ - cp ./CAPI/Tool_tutorial.md ./Md/ - cp ./QandA.md ./Md/ - cp ./使用文档.md ./Md/ - cp ./logic/GameRules.md ./Md/ - - - name: Create PDF - uses: mkrakowitzer/actions-makepdfs@v1.3 - with: - markdown_dir: ./Md - output_dir: ./THUAI6/