Skip to content

Commit

Permalink
feat: add SourceLink support for Core project (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwwoda committed Feb 21, 2022
1 parent 522c15e commit a9cbede
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Box.V2.Core/Box.V2.Core.csproj
Expand Up @@ -19,6 +19,9 @@
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -35,6 +38,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Portable.BouncyCastle" Version="1.8.10" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.13.1" />
Expand Down
10 changes: 9 additions & 1 deletion build/publish_core_package.ps1
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit a9cbede

Please sign in to comment.