-
Notifications
You must be signed in to change notification settings - Fork 3
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 (#31)
* 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`). * Use `dotnet-version-cli` rather than custom target to update versions. * Remove custom targets and legacy, manual-publish ones. * Remove NuGet test project
- Loading branch information
1 parent
63367f0
commit 254b093
Showing
14 changed files
with
113 additions
and
356 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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> |
Oops, something went wrong.