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] 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/