diff --git a/scripts/publish.ps1 b/scripts/publish.ps1 new file mode 100755 index 0000000..0ec242f --- /dev/null +++ b/scripts/publish.ps1 @@ -0,0 +1,20 @@ +#! /usr/bin/pwsh + +Param( + [Parameter(Mandatory)] [String] $ApiKey, + [Parameter()] [String] $Source = 'https://www.powershellgallery.com/api/v2/package' +) + +Set-StrictMode -Version Latest + +$ErrorActionPreference = 'Stop' + +$ErrorView = "NormalView" + +$basePath = Join-Path $PSScriptRoot '..' + + +Get-Item -Path (Join-Path -Path $basePath 'dist' '*.nupkg') | ForEach { + + nuget push $_ -Source $Source -ApiKey $ApiKey +}