This commit is contained in:
2022-11-30 11:23:59 +08:00
parent fdaf7518c6
commit 5e17e20aab
15 changed files with 79 additions and 104 deletions

23
push2nuget.ps1 Normal file
View File

@@ -0,0 +1,23 @@
Param(
# Nuget APIKey
[string] $apikey
)
if ($apikey -eq $null -or $apikey -eq "")
{
Write-Error "require apiKey";
return;
}
rm -r ./build/nupkgs
dotnet build -c Release ./src/NSExt.sln
$files = Get-ChildItem -Path ./build/nupkgs/ -Filter *.nupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}
$files = Get-ChildItem -Path ./build/nupkgs/ -Filter *.snupkg
foreach($file in $files)
{
dotnet nuget push $file.fullName --skip-duplicate --api-key $apikey --source https://api.nuget.org/v3/index.json
}