Skip to content

Commit 59ff85d

Browse files
committed
chore
1 parent fae0589 commit 59ff85d

2 files changed

Lines changed: 40 additions & 3 deletions

File tree

.github/workflows/README-RELEASE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,18 @@ git push origin main
8181
5. **发布到 NuGet**:自动推送所有包到 NuGet.org
8282
6. **创建 GitHub Release**:自动创建带标签的 GitHub Release
8383

84+
## 支持的目标框架
85+
86+
所有发布的包都支持以下目标框架:
87+
- **.NET Standard 2.1**
88+
- **.NET 6.0**
89+
- **.NET 7.0**
90+
- **.NET 8.0**
91+
- **.NET 9.0**
92+
- **.NET 10.0**
93+
94+
**说明**:.NET SDK 10.0 向后兼容,可以构建所有上述目标框架。workflow 会自动为每个目标框架生成对应的程序集并打包到 NuGet 包中。
95+
8496
## 会发布的项目
8597

8698
以下项目会被自动更新版本号并发布:

.github/workflows/release-nuget.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,21 @@ jobs:
6969
if: steps.check_commit.outputs.trigger_release == 'true'
7070
uses: actions/setup-dotnet@v4
7171
with:
72-
dotnet-version: '10.0.x' # 使用最新的 .NET 10 SDK
72+
# .NET SDK 10.0 可以构建所有目标框架:netstandard2.1, net6.0, net7.0, net8.0, net9.0, net10.0
73+
dotnet-version: '10.0.x'
74+
75+
- name: Verify .NET SDK and target frameworks
76+
if: steps.check_commit.outputs.trigger_release == 'true'
77+
run: |
78+
echo "=== .NET SDK Information ==="
79+
dotnet --version
80+
echo ""
81+
echo "=== Installed SDKs ==="
82+
dotnet --list-sdks
83+
echo ""
84+
echo "=== Supported Target Frameworks ==="
85+
echo "The project supports: netstandard2.1, net6.0, net7.0, net8.0, net9.0, net10.0"
86+
echo ".NET SDK 10.0 can build all these target frameworks."
7387
7488
- name: Update version in all project files
7589
if: steps.check_commit.outputs.trigger_release == 'true'
@@ -132,12 +146,23 @@ jobs:
132146
- name: Build
133147
if: steps.check_commit.outputs.trigger_release == 'true'
134148
working-directory: Cyaim.WebSocketServer
135-
run: dotnet build --configuration Release --no-restore
149+
run: |
150+
echo "Building all target frameworks: netstandard2.1, net6.0, net7.0, net8.0, net9.0, net10.0"
151+
dotnet build --configuration Release --no-restore
152+
echo ""
153+
echo "=== Build Summary ==="
154+
echo "Checking built assemblies for each target framework..."
155+
find . -path "*/bin/Release/*.dll" -type f | grep -E "(netstandard2.1|net6.0|net7.0|net8.0|net9.0|net10.0)" | sort
136156
137157
- name: Pack
138158
if: steps.check_commit.outputs.trigger_release == 'true'
139159
working-directory: Cyaim.WebSocketServer
140-
run: dotnet pack --configuration Release --no-build --output ./artifacts
160+
run: |
161+
echo "Packing NuGet packages for all target frameworks..."
162+
dotnet pack --configuration Release --no-build --output ./artifacts
163+
echo ""
164+
echo "=== Package Contents Verification ==="
165+
echo "Each package should contain assemblies for: netstandard2.1, net6.0, net7.0, net8.0, net9.0, net10.0"
141166
142167
- name: List packages
143168
if: steps.check_commit.outputs.trigger_release == 'true'

0 commit comments

Comments
 (0)