forked from BpsLogicBuilder/LogicBuilder.DataComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRelease_Build_Push.ps1
More file actions
20 lines (15 loc) · 815 Bytes
/
Release_Build_Push.ps1
File metadata and controls
20 lines (15 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$scriptName = $MyInvocation.MyCommand.Name
Write-Host "Owner ${Env:REPO_OWNER}"
Write-Host "Repository ${Env:REPO}"
$PROJECT_PATH = ".\$($Env:PROJECT_NAME)\$($Env:PROJECT_NAME).csproj"
$NUGET_PACKAGE_PATH = ".\artifacts\$($Env:PROJECT_NAME).*.nupkg"
Write-Host "Project Path ${PROJECT_PATH}"
Write-Host "Package Path ${NUGET_PACKAGE_PATH}"
dotnet build $PROJECT_PATH --configuration Release
if ($Env:REPO_OWNER -ne "BpsLogicBuilder") {
Write-Host "${scriptName}: Only create packages on BpsLogicBuilder repositories."
} else {
dotnet pack $PROJECT_PATH -c Release -o .\artifacts --no-build
dotnet nuget push $NUGET_PACKAGE_PATH --skip-duplicate --api-key $Env:GITHUB_NUGET_AUTH_TOKEN
dotnet nuget push $NUGET_PACKAGE_PATH --skip-duplicate --source $Env:NUGET_URL --api-key $Env:NUGET_API_KEY
}