Skip to content

Commit 5306753

Browse files
author
yangxinran
committed
优化 NuGet 发布工作流配置
- 添加 dotnet build 步骤 - 移除 Release 配置的重复设置 - 启用 --no-build 选项以提高打包效率
1 parent cf4e3a0 commit 5306753

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/publish.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
env:
99
PROJECT_PATH: ./source/${{ github.event.repository.name }}/${{ github.event.repository.name }}.csproj
10+
CONFIGURATION: Release
1011

1112
jobs:
1213
build-and-publish:
@@ -20,10 +21,15 @@ jobs:
2021
- run: >
2122
dotnet restore
2223
${{ env.PROJECT_PATH }}
24+
- run: >
25+
dotnet build
26+
${{ env.PROJECT_PATH }}
27+
--configuration ${{ env.CONFIGURATION }}
28+
--no-restore
2329
- run: >
2430
dotnet pack
2531
${{ env.PROJECT_PATH }}
26-
--configuration Release
32+
--no-build
2733
--output ./publish
2834
- run: >
2935
dotnet nuget push

0 commit comments

Comments
 (0)