feat: add publish script

This commit is contained in:
Rodweil, Theodor 2023-08-08 23:16:06 +02:00
parent 08dc46ca35
commit 338b9cecb2
No known key found for this signature in database
GPG key ID: F8BC1B0EB1F9CCF5

20
scripts/publish.ps1 Executable file
View file

@ -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
}