|
|
|
@@ -0,0 +1,86 @@ |
|
|
|
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: [ master] |
|
|
|
|
|
|
|
jobs: |
|
|
|
build_upload: |
|
|
|
runs-on: windows-latest |
|
|
|
if: false # Skip this job |
|
|
|
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: | |
|
|
|
New-Item -Path . -Name "THUAI6" -ItemType "directory" |
|
|
|
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 Markdown |
|
|
|
run: | |
|
|
|
New-Item -Path . -Name "Md" -ItemType "directory" |
|
|
|
cp ./CAPI/CAPI接口(cpp).md ./Md/ |
|
|
|
cp ./CAPI/CAPI接口(python).md ./Md/ |
|
|
|
cp ./CAPI/Tool_tutorial.md ./Md/ |
|
|
|
cp Q&A.md ./Md/ |
|
|
|
cp 使用文档.md ./Md/ |
|
|
|
cp GameRules.md ./Md/ |
|
|
|
|
|
|
|
- name: Markdown to PDF and HTML |
|
|
|
uses: BaileyJM02/markdown-to-pdf@v1.2.0 |
|
|
|
with: |
|
|
|
input_dir: ./Md |
|
|
|
output_dir: ./THUAI6/ |
|
|
|
images_dir: ./resource |
|
|
|
image_import: ./images |
|
|
|
build_html: false |
|
|
|
|
|
|
|
- name: Tencent Cloud COS Action |
|
|
|
uses: TencentCloud/cos-action@v1 |
|
|
|
with: |
|
|
|
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} |
|
|
|
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} |
|
|
|
cos_bucket: ${{ secrets.COS_BUCKET }} |
|
|
|
cos_region: ${{ secrets.COS_REGION }} |
|
|
|
local_path: ./THUAI6 |
|
|
|
remote_path: THUAI6 |
|
|
|
clean: true |