From a9cbedece2ffb4f832be880bebf35b715c9cb28b Mon Sep 17 00:00:00 2001 From: Mateusz Woda Date: Mon, 21 Feb 2022 17:28:37 +0100 Subject: [PATCH] feat: add `SourceLink` support for Core project (#795) --- Box.V2.Core/Box.V2.Core.csproj | 4 ++++ build/publish_core_package.ps1 | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Box.V2.Core/Box.V2.Core.csproj b/Box.V2.Core/Box.V2.Core.csproj index 4f7e27656..28a2d1be2 100644 --- a/Box.V2.Core/Box.V2.Core.csproj +++ b/Box.V2.Core/Box.V2.Core.csproj @@ -19,6 +19,9 @@ false false false + true + true + snupkg @@ -35,6 +38,7 @@ + diff --git a/build/publish_core_package.ps1 b/build/publish_core_package.ps1 index 840c20d0d..17e011fea 100644 --- a/build/publish_core_package.ps1 +++ b/build/publish_core_package.ps1 @@ -35,6 +35,7 @@ if($NextVersion -eq $null -Or $NextVersion -eq ''){ $NextVersionTag = "v" + $NextVersion $CORE_NUPKG_PATH="$CORE_PROJ_DIR" + "\bin\Release\" + "$CORE_ASSEMBLY_NAME" + "." + "$NextVersion" + ".nupkg" +$CORE_SNUPKG_PATH="$CORE_PROJ_DIR" + "\bin\Release\" + "$CORE_ASSEMBLY_NAME" + "." + "$NextVersion" + ".snupkg" ########################################################################### # Parameters validation @@ -125,6 +126,7 @@ if ($DryRun) { $release | New-GitHubReleaseAsset -Path $CORE_NUPKG_PATH $release | New-GitHubReleaseAsset -Path $CORE_PDB_PATH + $release | New-GitHubReleaseAsset -Path $CORE_SNUPKG_PATH Clear-GitHubAuthentication } @@ -138,7 +140,13 @@ if ($DryRun) { }else{ dotnet nuget push $CORE_NUPKG_PATH -k $NugetKey -s $NUGET_URL --skip-duplicate if ($LASTEXITCODE -ne 0) { - Write-Output "Nuget push failed. Aborting script" + Write-Output "Nuget push nupkg failed. Aborting script" + RemoveSensitiveData + exit 1 + } + dotnet nuget push $CORE_SNUPKG_PATH -k $NugetKey -s $NUGET_URL --skip-duplicate + if ($LASTEXITCODE -ne 0) { + Write-Output "Nuget push snupkg failed. Aborting script" RemoveSensitiveData exit 1 }