You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- name: "upload_COS"
-
- ###############################################################################
- # This ci packages the repository files and uploads them to
- # the Tencent cloud storage bucket
- ###############################################################################
-
- on:
- push:
- branches: [ main ]
-
- 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
-
- # 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\win\win64\Debug
-
- 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\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
- 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 .\CAPI\shell\* .\THUAI6\linux\
-
- - name: Copy shell
- run: |
- cp -r .\CAPI\cmd\* .\THUAI6\win\
-
- - 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
|