Skip to content

Commit

Permalink
Update submodules & fix DeleteFileService & impl workflow (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
pk5ls20 authored Sep 21, 2024
1 parent ee217a3 commit 8d5252f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lagrange.Kritor Build

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build Lagrange.Kritor .NET 8.0
run: dotnet publish Lagrange.Kritor/Lagrange.Kritor.csproj --no-self-contained -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:DebugType=none -p:RuntimeIdentifier=win-x64 --framework net8.0
- name: Upload binary files win-x64 for .NET 8.0
uses: actions/upload-artifact@v4
with:
name: Lagrange.Kritor_win-x64_net8.0_NoSelfContained
path: Lagrange.Kritor/bin/Release/net8.0/win-x64/publish
2 changes: 1 addition & 1 deletion Lagrange.Core
Submodule Lagrange.Core updated 101 files
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ public override async Task<DeleteFolderResponse> DeleteFolder(DeleteFolderReques
// }

public override async Task<DeleteFileResponse> DeleteFile(DeleteFileRequest request, ServerCallContext context) {
if (await _bot.GroupFSDelete((uint)request.GroupId, request.FileId)) {
throw new RpcException(new(StatusCode.Unknown, "Unknown"));
}
(int retCode, string retMsg) = await _bot.GroupFSDelete((uint)request.GroupId, request.FileId);
if (retCode != 0) throw new RpcException(new(StatusCode.Unknown, retMsg));
return new();
}

Expand Down Expand Up @@ -79,4 +78,4 @@ public override async Task<DeleteFileResponse> DeleteFile(DeleteFileRequest requ
// }
// }
// }
}
}

0 comments on commit 8d5252f

Please sign in to comment.