Skip to content

Commit

Permalink
Create pack.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Sep 18, 2022
1 parent d5bd828 commit 6d3032a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions templates/pack.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
param (
[string]$version = "1.0.0",
[switch]$push = $false,
[string]$apikey = "",
[string]$source = "nuget.org"
)

Invoke-Expression "dotnet clean"

if (!$skipbuild) {
Invoke-Expression "dotnet pack -c Release -o . -p:packageVersion=$version"
}
if ($push) {
Invoke-Expression "dotnet nuget push '*.$version.nupkg' --api-key $apikey --skip-duplicate --source $source"
}

Set-Location ../ # back to root

0 comments on commit 6d3032a

Please sign in to comment.