-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pack.ps1
24 lines (19 loc) · 821 Bytes
/
pack.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
param(
[Parameter(mandatory = $false)]
[switch]$dryRun = $false
)
remove-item -path .\signed\*.* -Force
remove-item -path .\artifacts\*.* -Force
new-item -Path artifacts -ItemType Directory -Force | out-null
new-item -Path signed -ItemType Directory -Force | out-null
#dotnet build Wangkanai.Architecture.Templates.csproj -c Release
dotnet pack Wangkanai.Architecture.Templates.csproj -c Release -o .\artifacts
dotnet nuget sign .\artifacts\*.nupkg -v diag --timestamper http://timestamp.digicert.com --certificate-subject-name "Sarin Na Wangkanai" -o .\signed
remove-item -path .\artifacts\*.*
if ($dryRun)
{
write-host "Dry run is successful" -ForegroundColor Green
exit
}
dotnet nuget push .\signed\*.nupkg -k $env:NUGET_API_KEY -s https://api.nuget.org/v3/index.json --skip-duplicate
.\version.ps1