Browse Source

fix: 🐛 have a try

tags/0.1.0
shangfengh 2 years ago
parent
commit
7e584ad3f0
1 changed files with 75 additions and 0 deletions
  1. +75
    -0
      .github/workflows/uploadtome.yml

+ 75
- 0
.github/workflows/uploadtome.yml View File

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

Loading…
Cancel
Save