From 958a47874ed45ea0b5e6a506cce84c26217ebceb Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Fri, 21 Apr 2023 13:55:36 +0800 Subject: [PATCH 1/2] fix: :poop: fix py --- dependency/py/HashFiles.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dependency/py/HashFiles.py b/dependency/py/HashFiles.py index 07c2fdc..44dd867 100644 --- a/dependency/py/HashFiles.py +++ b/dependency/py/HashFiles.py @@ -16,7 +16,9 @@ def generateHashFile(): path = os.path.join(root, file) with open(path, 'rb') as f: data = f.read() - hashlist[path.replace('\\','/')]=hashlib.md5(data).hexdigest() + pathr = path.replace('../','') + pathr = path.replace('./','') + hashlist[pathr.replace('\\','/')]=hashlib.md5(data).hexdigest() targetFile=os.path.join(targetfolder,'hash.json') with open(targetFile, 'w') as fp: json.dump(hashlist,fp) From 06dce6efb53bea05c68ab85d6de4b320872968cd Mon Sep 17 00:00:00 2001 From: shangfengh <3495281661@qq.com> Date: Fri, 21 Apr 2023 14:02:14 +0800 Subject: [PATCH 2/2] ci: :poop: remove file --- .github/workflows/upload_COS.yml | 34 +++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/upload_COS.yml b/.github/workflows/upload_COS.yml index 278d9c0..7edc6b6 100644 --- a/.github/workflows/upload_COS.yml +++ b/.github/workflows/upload_COS.yml @@ -42,19 +42,10 @@ jobs: 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 - rm ./THUAI6/linux/linux64/System.*.dll - rm ./THUAI6/linux/linux64/Debug/System.*.dll - rm ./THUAI6/win/win64/System.*.dll - rm ./THUAI6/win/win64/Debug/System.*.dll rm ./THUAI6/linux/linux64/*.pdb rm ./THUAI6/linux/linux64/Debug/*.pdb rm ./THUAI6/win/win64/*.pdb rm ./THUAI6/win/win64/Debug/*.pdb - rm ./THUAI6/win/win64/Debug/grpc_csharp_ext.x64.dll - rm ./THUAI6/win/win64/grpc_csharp_ext.x64.dll - - rm ./THUAI6/linux/linux64/*.so - rm ./THUAI6/linux/linux64/Debug/*.so - name: Copy CAPI run: | @@ -120,23 +111,38 @@ jobs: image_import: ./images build_html: false + - name: Hash Files + run: | + python ./dependency/py/HashFiles.py -t ./THUAI6 + - name: Upload COS uses: zkqiang/tencent-cos-action@v0.1.0 with: - args: upload -r ./THUAI6/ /THUAI6/ + args: upload -r ./THUAI6/hash.json / secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} bucket: ${{ secrets.COS_BUCKET }} region: ${{ secrets.COS_REGION }} - - name: Hash Files - run: | - python ./dependency/py/HashFiles.py -t ./THUAI6 + - name: Remove Files + run: | + rm ./THUAI6/hash.json + rm ./THUAI6/win/win64/PresentationCore.dll + rm ./THUAI6/win/win64/WindowsBase.dll + rm ./THUAI6/linux/linux64/System.*.dll + rm ./THUAI6/linux/linux64/Debug/System.*.dll + rm ./THUAI6/win/win64/System.*.dll + rm ./THUAI6/win/win64/Debug/System.*.dll + rm ./THUAI6/win/win64/Debug/grpc_csharp_ext.x64.dll + rm ./THUAI6/win/win64/grpc_csharp_ext.x64.dll + + rm ./THUAI6/linux/linux64/*.so + rm ./THUAI6/linux/linux64/Debug/*.so - name: Upload COS uses: zkqiang/tencent-cos-action@v0.1.0 with: - args: upload -r ./THUAI6/hash.json / + args: upload -r ./THUAI6/ /THUAI6/ secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} bucket: ${{ secrets.COS_BUCKET }}