mirror of
https://github.com/nsnail/ns-ext.git
synced 2025-08-03 12:57:58 +08:00
..
This commit is contained in:
24
script/build-and-push.ps1
Normal file
24
script/build-and-push.ps1
Normal file
@ -0,0 +1,24 @@
|
||||
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Param(
|
||||
# Nuget APIKey
|
||||
[string] $apikey
|
||||
)
|
||||
|
||||
if ($apikey -eq $null -or $apikey -eq "")
|
||||
{
|
||||
Write-Error "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>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
|
||||
}
|
Reference in New Issue
Block a user