deploynuget.ps1 471 B

12345678910111213
  1. $projectjson = ".\jint\project.json"
  2. if(![System.IO.File]::Exists(".\.nuget\nuget.exe")){
  3. New-Item ".nuget" -type directory
  4. Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile "./.nuget/nuget.exe"
  5. }
  6. if([System.IO.File]::Exists("./artifacts")){
  7. Remove-Item .\artifacts -Force -Recurse
  8. }
  9. dotnet pack $projectjson -c Release -o .\artifacts
  10. .\.nuget\nuget.exe push .\artifacts\*.nupkg -Source nuget.org -ApiKey $nugetApiKey