-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 Implement 'Build Once' strategy in CI pipeline (#11)
* Run CI with very branch push. * Build only once, generating package in CI (with version `0.0.0-ci-$(Build.BuildNumber)` for now). This requires applying a workaround for Coverlet, to able to collect code coverage when the solution is built with `ContinuousIntegrationBuild=true` (see [this](dotnet/sourcelink#572) and [this](https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md). * Fix custom task conditions: `succeeded()` behavior only applies by default when `condition` is not overriden. * Add publish package guard (`Push != ''`) and options to avoid commiting new version and tag (`NoCommit`) and pushing packages to GitHub (`NoGitHubPush`) and NuGet (`NoNuGetPush`). * Bump `SourceLink` and `Coverlet` and `dotnet-version-cli` versions.
- Loading branch information
1 parent
b2805b1
commit fa04c97
Showing
9 changed files
with
100 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- Workaround for deterministic build and coverlet (https://github.com/dotnet/sourcelink/issues/572), see https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md --> | ||
<Project> | ||
<PropertyGroup> | ||
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<SourceRoot Include="$(NuGetPackageRoot)" /> | ||
</ItemGroup> | ||
|
||
<Target Name="CoverletGetPathMap" | ||
DependsOnTargets="InitializeSourceRootMappedPaths" | ||
Returns="@(_LocalTopLevelSourceRoot)" | ||
Condition="'$(DeterministicSourcePaths)' == 'true'"> | ||
<ItemGroup> | ||
<_LocalTopLevelSourceRoot Include="@(SourceRoot)" Condition="'%(SourceRoot.NestedRoot)' == ''"/> | ||
</ItemGroup> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<Project> | ||
<!-- Workaround for deterministic build and coverlet (https://github.com/dotnet/sourcelink/issues/572), see https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/DeterministicBuild.md --> | ||
<Import Project="$(MSBuildThisFileDirectory)DeterministicBuild.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters