diff --git a/csharp/build_release.sh b/csharp/build_release.sh index 40452925e37b3..e226f78b89f60 100755 --- a/csharp/build_release.sh +++ b/csharp/build_release.sh @@ -6,6 +6,12 @@ cd $(dirname $(readlink $BASH_SOURCE)) export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true export DOTNET_CLI_TELEMETRY_OPTOUT=true +# Make sure that SourceLink uses the GitHub repo, even if that's not where +# our origin remote points at. +git remote add github https://github.com/googleapis/google-api-dotnet-client +export GitRepositoryRemoteName=github +export DeterministicSourcePaths=true + # Builds Google.Protobuf NuGet packages dotnet restore -s /lib/csharp/ src/Google.Protobuf/Google.Protobuf.csproj dotnet pack --no-restore -c Release src/Google.Protobuf.sln -p:ContinuousIntegrationBuild=true