From 338b9cecb2b6f3635151f3ec30f94a7bfb2a5af2 Mon Sep 17 00:00:00 2001 From: "Rodweil, Theodor" Date: Tue, 8 Aug 2023 23:16:06 +0200 Subject: [PATCH] feat: add publish script --- scripts/publish.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/publish.ps1 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 +}