Browse Source

fix: 💚 fix CI

tags/0.1.0
shangfengh 2 years ago
parent
commit
d110467cb3
1 changed files with 51 additions and 10 deletions
  1. +51
    -10
      .github/workflows/upload_COS.yml

+ 51
- 10
.github/workflows/upload_COS.yml View File

@@ -10,7 +10,7 @@ on:
branches: [ main, dev ] branches: [ main, dev ]


jobs: jobs:
build_upload:
win_build_upload:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -28,23 +28,64 @@ jobs:
- name: Pip Install paramiko - name: Pip Install paramiko
run: pip install paramiko run: pip install paramiko


#
# dotnet publish "./logic/Client/Client.csproj" -c Release -r win-x64 -o ./THUAI6/win/win64 --self-contained true

- name: Publish - name: Publish
run: |
mkdir -p THUAI6/win/win64
run: |
mkdir -p THUAI6/win/win64/Debug mkdir -p THUAI6/win/win64/Debug
mkdir -p THUAI6/linux/linux64
mkdir -p THUAI6/linux/linux64/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 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 win-x64 -o ./THUAI6/win/win64/Debug --self-contained true

- name: Upload COS
uses: zkqiang/tencent-cos-action@v0.1.0
with:
args: upload -r ./THUAI6/ /THUAI6/
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET }}
region: ${{ secrets.COS_REGION }}

linux_build_upload:
runs-on: ubuntu-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'

- name: Pip Install paramiko
run: pip install paramiko

- name: Publish
run: |
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 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 dotnet publish "./logic/Server/Server.csproj" -c Debug -r linux-x64 -o ./THUAI6/linux/linux64/Debug --self-contained true


- name: Upload COS
uses: zkqiang/tencent-cos-action@v0.1.0
with:
args: upload -r ./THUAI6/ /THUAI6/
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET }}
region: ${{ secrets.COS_REGION }}

capi_build_upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Copy CAPI - name: Copy CAPI
run: | run: |
mkdir -p THUAI6/linux
mkdir -p THUAI6/win/CAPI/proto mkdir -p THUAI6/win/CAPI/proto
cp ./dependency/proto/Message2Clients.proto ./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/Message2Server.proto ./THUAI6/win/CAPI/proto/
@@ -62,8 +103,8 @@ jobs:
- name: Upload COS - name: Upload COS
uses: zkqiang/tencent-cos-action@v0.1.0 uses: zkqiang/tencent-cos-action@v0.1.0
with: with:
args: upload -r ./THUAI6/ /
args: upload -r ./THUAI6/ /THUAI6/
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET }} bucket: ${{ secrets.COS_BUCKET }}
region: ${{ secrets.COS_REGION }}
region: ${{ secrets.COS_REGION }}

Loading…
Cancel
Save