File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build & Release SLDataAPI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ build :
13+ runs-on : windows-latest
14+
15+ steps :
16+ - name : 📥 Checkout 仓库
17+ uses : actions/checkout@v4
18+
19+ - name : 🧰 设置 MSBuild
20+ uses : microsoft/setup-msbuild@v2
21+
22+ - name : 📦 安装 NuGet
23+ uses : NuGet/setup-nuget@v2
24+
25+ - name : 📦 还原依赖
26+ run : dotnet restore
27+
28+ - name : 🛠 编译项目
29+ run : msbuild SLDataAPI.csproj /p:Configuration=Release
30+
31+ - name : 📂 查找 DLL
32+ id : find_dll
33+ run : |
34+ $dll = Get-ChildItem -Recurse -Filter "*.dll" | Where-Object { $_.Name -eq "SLDataAPI.dll" } | Select-Object -First 1
35+ echo "dll_path=$($dll.FullName)" >> $env:GITHUB_OUTPUT
36+
37+ - name : 🏷 获取版本号
38+ id : version
39+ run : |
40+ $version = "v1.0.$(Get-Date -Format yyyyMMddHHmmss)"
41+ echo "version=$version" >> $env:GITHUB_OUTPUT
42+
43+ - name : 🚀 创建 Release
44+ uses : softprops/action-gh-release@v2
45+ with :
46+ tag_name : ${{ steps.version.outputs.version }}
47+ name : DeepSeekBot ${{ steps.version.outputs.version }}
48+ files : ${{ steps.find_dll.outputs.dll_path }}
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments