feat: add publish script
This commit is contained in:
parent
08dc46ca35
commit
338b9cecb2
1 changed files with 20 additions and 0 deletions
20
scripts/publish.ps1
Executable file
20
scripts/publish.ps1
Executable 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue