|
69 | 69 | if: steps.check_commit.outputs.trigger_release == 'true' |
70 | 70 | uses: actions/setup-dotnet@v4 |
71 | 71 | 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." |
73 | 87 | |
74 | 88 | - name: Update version in all project files |
75 | 89 | if: steps.check_commit.outputs.trigger_release == 'true' |
@@ -132,12 +146,23 @@ jobs: |
132 | 146 | - name: Build |
133 | 147 | if: steps.check_commit.outputs.trigger_release == 'true' |
134 | 148 | 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 |
136 | 156 | |
137 | 157 | - name: Pack |
138 | 158 | if: steps.check_commit.outputs.trigger_release == 'true' |
139 | 159 | 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" |
141 | 166 | |
142 | 167 | - name: List packages |
143 | 168 | if: steps.check_commit.outputs.trigger_release == 'true' |
|
0 commit comments