From 0f232f0a75c39b96f2b1eeba68d38aa5d5a5ea1c Mon Sep 17 00:00:00 2001 From: wanghu Date: Wed, 2 Sep 2026 11:18:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=89=88=E6=9C=AC=E5=88=87=E8=87=B3=20?= =?UTF-8?q?1.0.0-preview.1=EF=BC=8CCI=20push=20=E6=AD=A5=E9=AA=A4=E6=94=B9?= =?UTF-8?q?=E8=B5=B0=20nuget.config=20=E5=B8=A6=E5=87=AD=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Directory.Build.props: YhPlatformNetVersion 1.0.0 -> 1.0.0-preview.1(核对表 #6~#9/#12 未实调先发预发布) - ci.yml: Push to Nexus 步骤改为动态生成带凭据的 nuget.config(allowInsecureConnections + packageSourceCredentials),去掉不适用的 --skip-duplicate --- BasePlatformDotnet/.gitea/workflows/ci.yml | 26 +++++++++++++++++----- BasePlatformDotnet/Directory.Build.props | 5 +++-- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/BasePlatformDotnet/.gitea/workflows/ci.yml b/BasePlatformDotnet/.gitea/workflows/ci.yml index 00b8211..19447ad 100644 --- a/BasePlatformDotnet/.gitea/workflows/ci.yml +++ b/BasePlatformDotnet/.gitea/workflows/ci.yml @@ -44,9 +44,23 @@ jobs: run: dotnet pack yh-platform-net.sln -c Release -o artifacts - name: Push to Nexus - run: > - dotnet nuget push "artifacts/*.nupkg" - --source ${{ secrets.NEXUS_URL }} - --username ${{ secrets.NEXUS_USER }} - --password "${{ secrets.NEXUS_PASS }}" - --api-key nexus --skip-duplicate + # Nexus 的 NuGet 推送认证走 HTTP Basic(账号+密码),不校验 api-key; + # 且 Nexus 为 http 源,SDK 8 需在 nuget.config 显式 allowInsecureConnections=true。 + # 动态生成带凭据的 nuget.config 并指定 --configfile,避免凭据入 git。 + run: | + cat > nuget-push.config < + + + + + + + + + + + + + EOF + dotnet nuget push "artifacts/*.nupkg" --source nexus-nuget --configfile nuget-push.config --api-key nexus diff --git a/BasePlatformDotnet/Directory.Build.props b/BasePlatformDotnet/Directory.Build.props index 0fbb85b..cbddf3c 100644 --- a/BasePlatformDotnet/Directory.Build.props +++ b/BasePlatformDotnet/Directory.Build.props @@ -9,8 +9,9 @@ true false true - - 1.0.0 + + 1.0.0-preview.1 $(YhPlatformNetVersion) yunhai-platform yunhai