Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add SourceLink support for Core project #795

Merged
merged 9 commits into from
Feb 21, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Box.V2.Core/Box.V2.Core.csproj
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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