Use arcade's conditional pattern for publishing (#11172)

Arcade runs CI/PR builds with --publish on. This does a general dry run of some parts of publishing. However, in this mode, packages are NOT published, as the azdo publishing target does not run if DotNetPublishUsingPipelines is false. This is false in non-official scenarios. installer is missing a check of this conditional for its custom installer publishing. Add it.
Note that we could probably remove the explicit use of PushToAzureDevOpsArtifacts in installer, by using `eng/Publishing.props` in a more typical workflow. See https://github.com/dotnet/aspnetcore/blob/main/eng/Publishing.props for an example of this. That would also avoid this bug.
This commit is contained in:
Matt Mitchell 2021-07-20 12:33:43 -07:00 committed by GitHub
parent 5d8615554e
commit 64c36e46ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,8 @@
</ItemGroup>
<Target Name="PublishSdkAssetsAndChecksums"
BeforeTargets="Publish">
BeforeTargets="Publish"
Condition="$(DotNetPublishUsingPipelines)">
<ReadLinesFromFile File="$(ArtifactsTmpDir)FullNugetVersion.version">
<Output