mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-23 09:48:48 +08:00
29 lines
1.1 KiB
PowerShell
29 lines
1.1 KiB
PowerShell
param (
|
|
[string]$localSourcesDir = "D:/nuget.local",
|
|
[string]$buildType = "Release",
|
|
[string]$preReleaseTag
|
|
)
|
|
|
|
dotnet build -v diag --configuration $buildType ../packages/AtomUI/AtomUI.csproj
|
|
dotnet build -v diag --configuration $buildType ../src/AtomUI.Controls.DataGrid/AtomUI.Controls.DataGrid.csproj
|
|
dotnet pack --no-build --configuration $buildType ../packages/AtomUI/AtomUI.csproj
|
|
dotnet pack --no-build --configuration $buildType ../src/AtomUI.IconPkg.Generator/AtomUI.IconPkg.Generator.csproj
|
|
dotnet pack --no-build --configuration $buildType ../src/AtomUI.Generator/AtomUI.Generator.csproj
|
|
dotnet pack --no-build --configuration $buildType ../src/AtomUI.Controls.DataGrid/AtomUI.Controls.DataGrid.csproj
|
|
|
|
# 探测包
|
|
$packages = Get-ChildItem -Path ../output/Nuget -Filter *.nupkg -Recurse -File
|
|
|
|
foreach ($pkg in $packages) {
|
|
try {
|
|
# 执行 NuGet 推送命令
|
|
dotnet nuget push $pkg.FullName --source $localSourcesDir
|
|
|
|
if ($LASTEXITCODE -ne 0) {
|
|
Write-Warning "推送失败: $($pkg.Name)"
|
|
}
|
|
}
|
|
catch {
|
|
Write-Error "推送 $($pkg.Name) 时发生异常: $_"
|
|
}
|
|
} |