Skip to content

Commit 46eb300

Browse files
authored
Migrate build tool from nuke build to cake build cause nuke build seems to be discontinued (#70)
* Add Cake.Frosting-based build utilities for streamlined task management - Introduced `BuildContext` for managing solution, Git root, and executed tasks. - Added foundational task templates (`BuildTask`, `CleanTask`, `RestoreTask`, etc.) and default implementations. - Included CakeHost extensions for task registration and setup. - Created sample project demonstrating the usage of custom tasks. - Updated solution file to include new `CakeBuild` projects and samples. * Add support for solution file auto-detection, build configuration, and context initialization improvements - Renamed `CleanTask` to properly align task names with functionality. - Enhanced `BuildContext` to include solution file auto-detection, default build configuration, and Git version integration. - Simplified `BuildTask` templates and adjusted configuration handling. - Updated `CakeHost` sample with task registration and streamlined workflow. - Refactored project files for consistent dependencies and task integration. * Update `CakeContextExtensions` to include exception variable in catch block for improved diagnostics, and refine `GitVersion.yml` configuration - Replace `tag` with `label` for branch definitions. - Adjust formatting for improved YAML readability. * Simplify `GitVersion.yml` by removing unused branch configurations and redundant properties. * Update `GitVersion.yml` configuration for enhanced semantic versioning - Added `tag-prefix` and `semantic-version-format` properties for improved version tagging. - Simplified branch definitions by removing unused branches (`develop`, `support`, `hotfix`). - Adjusted `pull-request` label from `PullRequest` to `PR`. * Enhance `CleanTask` to clean solution builds - Implement `RunAsync` method, invoking `DotNetClean` and deleting `bin`/`obj` directories. - Introduce private `DeleteDirectories` method to simplify directory cleanup logic with glob patterns and logging. * Add missing `using` directives for `System.Linq` and `System.Threading.Tasks` in `CleanTask` * Add `HasExecutedTask` method to `BuildContext` and integrate with `BuildTask` for conditional `NoRestore` handling * Add missing `using System.Threading.Tasks` directive in `BuildTask` * Add missing `using System.Threading.Tasks` directive in `RestoreTask` * Log `NoRestore` setting in `BuildTask` for enhanced diagnostics when skipping restores * Add settings interfaces for task templates and refactor `BuildContext` - Introduce settings interfaces for task templates (`ICleanTaskSettings`, `ITestTaskSettings`, etc.). - Refactor `BuildContext` to enhance modularity and reuse of Git root path logic. - Add `UseBuildSetup` integration to `CakeHost` for streamlined build setup logic. * - Fix null reference in `IBuildPaths` by removing redundant `this` qualifier - Update `GitVersion.Tool` to version `6.5.1` in build project dependencies * Update GitHub Actions workflow: bump `actions/checkout` to v5 and adjust deploy step - Upgraded `actions/checkout` to version 5 for compatibility. - Commented out caching and artifact upload steps. - Modified the `DeployNuGet` step to run a specific build command within the `CakeBuildSample` directory. * Comment out Windows and macOS jobs in GitHub Actions workflow and remove redundant configuration in solution file. * Add `CakeTaskSettings` attribute for task settings interfaces and enhance `CakeHost` with settings support - Introduced `[CakeTaskSettings]` attribute to annotate task settings interfaces. - Refactored `CakeHost.UseBuildSetup` to inject and register task-specific settings interfaces. - Added missing `using` directives and improved modularity in task setup. * Set terminal environment variables in GitHub Actions for improved console output rendering * Add task setup and teardown for better grouping in Cake Frosting builds - Introduced `SomeTaskSetup` and `SomeTaskTeardown` to handle task-specific logic. - Integrated GitHub Actions group commands for improved build log readability. * Refactor `CleanTask` to reorder `DotNetClean` after directory deletions * Add information logging to task setup in `SomeTaskSetup` * Refactor `CakeHost` to simplify task setup and integrate build server functionality - Added `SetupHost`, `AddDefaultTasks`, and `AddBuildServerIntegration` extension methods to streamline configuration. - Replaced custom task setup and teardown (`SomeTaskSetup` and `SomeTaskTeardown`) with reusable GitHub Actions integrations (`StartGroupTaskSetup` and `EndGroupTaskTeardown`). - Updated `CakeBuildSample` to utilize new streamlined APIs. * Fix typo in `Ensure.cs` and add `ICakeHostBuilder` implementation for streamlined Cake build setup - Corrected `UnkownParamName` to `UnknownParamName` across all methods in `Ensure.cs`. - Introduced `ICakeHostBuilder` interface and its implementation, `CakeHostBuilder`, for simplifying Cake build configuration. - Updated `CakeHostExtensions` and `CakeBuildSample` to leverage the new `CakeHostBuilder`. * Clean up unused and redundant package references in Blazor and TokenAuthApi projects * Refactor build context and task settings for enhanced modularity and flexibility - Removed redundant interfaces (`IDefaultBuildSetup`, `IBuildPaths`, `ICakeBuildSettings`, etc.). - Introduced `IBuildContext` and `IBuildContextAccessor` to centralize build context management. - Updated `CleanTask` and `BuildTask` to leverage `ICleanTaskSettings`, improving task-specific configuration. - Refactored `BuildContext` to streamline directory and configuration management. - Simplified sample project setup using the new `SampleBuildContext`. * Add implementation for `TestTask` to execute `DotNetTest` with configurable settings and enhance `BuildTask` syntax consistency * Update integration workflow to run tests instead of build in `DeployNuGet` step * Refactor `FrostingTaskBase` and derived tasks to streamline task execution and enhance GitHub Actions integration - Introduced `RunAsyncCore` as a protected abstract method in `FrostingTaskBase`, replacing `RunAsync` in derived tasks. - Added GitHub Actions group logging for better task execution visibility. - Updated all template tasks to implement `RunAsyncCore` with appropriate logic or placeholders. * Remove `AddBuildServerIntegration` from `CakeBuildSample` for simplification * Annotate `FrostingTaskBase` with [PublicAPI] and update logging in task teardown for consistency * Comment out GitHub Actions group logging in `FrostingTaskBase` and add `AddBuildServerIntegration` to `CakeBuildSample`. * Refactor and update task settings and implementations for improved modularity and consistency - Changed `ICleanTaskSettings.DefaultDirectoriesToClean` to method `GetDefaultDirectoriesToClean` for better clarity and extensibility. - Introduced `TestProjects` property in `ITestTaskSettings`. - Removed commented GitHub Actions group logging from `FrostingTaskBase` for cleanup. - Streamlined `SampleBuildContext` to use updated `ICleanTaskSettings` API. * Annotate interfaces with [PublicAPI], refactor exception handling in CakeContextExtensions, enhance `ITestTaskSettings`, and update task implementations for improved modularity * Annotate `TestTask` with [PublicAPI] and update `ITestTaskSettings` to handle `.slnx` file format limitations * Add code coverage task implementation and update related settings for enhanced test reporting - Implement `CodeCoverageTask` using `ReportGenerator`. - Enhance `IBuildContext` with properties for managing code coverage directories and reports. - Update `TestTask` to support coverage collection and generate TRX reports. - Refactor `ITestTaskSettings` to include coverage-related settings. - Modify `.github/workflows` to execute the `codecoverage` task in the integration pipeline. - Add `ReportGenerator` to `CakeBuildSample` dependencies. * Add detailed build version logging to `BuildTask` - Log informational, assembly, and file versions during solution build for improved traceability. * Add `GitVersion.Tool` as a dependency to `CakeBuildSample` * Update `ICodeCoverageTaskSettings` with .NET framework property and configure tool paths in `CakeBuildSample` - Added `Framework` property to `ICodeCoverageTaskSettings` for dynamic .NET version handling. - Configured `CakeHost` in `CakeBuildSample` to use a temporary tools directory and install required tools. * Enable `windows-latest` runner in the integration workflow and update `DeployNuGet` step to run code coverage task. * Update `CodeCoverageTask` to log ReportGenerator process arguments and enhance tool installation in `CakeBuildSample` - Add diagnostic logging for ReportGenerator process arguments in `CodeCoverageTask` using `Information`. - Use `DotNetToolPackageInstaller` in `CakeBuildSample` for improved tool installation patterns. - Update tool URIs to use `dotnet:` scheme for consistency. * Update `CodeCoverageTask` to use `ICodeCoverageTaskSettings` for dynamic configuration - Refactor `CodeCoverageTask` to retrieve settings from `ICodeCoverageTaskSettings`. - Add `ReportGlobPattern` and `ReportTypes` * Add `IPackTaskSettings` and implement `PackTask` with NuGet packaging functionality - Introduced `IPackTaskSettings` for configuring NuGet packaging properties. - Implemented `PackTask` to use `DotNetPack` with dynamic settings retrieval. - Updated `IDefaultTaskSettings` to include `IPackTaskSettings`. - Enhanced `BuildTask` with detailed package version logging. - Modified `GitVersion.yml` for improved feature branch regex and deployment configurations. * Add `PackageLicenseExpression` and MSBuild settings extensions for enhanced packaging configuration - Introduced `PackageLicenseExpression` with predefined license constants. - Added MSBuild settings extension methods for configuring package properties (`WithPackageProjectUrl`, `WithPackageLicenseUrl`, `WithPackageLicenseExpression`, and `WithCopyright`). - Updated `PackTask` to utilize the new extension methods for cleaner configuration of packaging settings. * Rename `NuGetPublishTask` to `NuGetPushTask` and implement push functionality - Updated class, interfaces, and settings from `NuGetPublish` to `NuGetPush` for consistency with naming conventions. - Added NuGet push implementation using `DotNetNuGetPush` with configurable settings. - Extended `IDefaultTaskSettings` to include `INuGetPushTaskSettings`. * Rename `[TaskName]` from `NuGetPublish` to `NuGetPush` for consistency with task naming conventions. * - Update task settings to use `GetRequiredSettings<T>` for improved error handling - Add `DefaultHostSetup` to summarize setup configuration during execution - Rename `PackageLicenseExpression` to `PackageLicenseExpressions` for consistency - Introduce `PrintSetupSummary` property for better control over setup logging - Enhance integration workflow for NuGet push with added `NUGET_TOKEN` configuration * Simplify integration workflow by removing auto-generation comments and adding NuGet package directory listing. * Add warning log for GitVersion fallback and improve exception handling - Enable `coverage-report` artifact publishing in the integration workflow * Update tool URI scheme to `nuget:` for `GitVersion.Tool` and enable NuGet cache in integration workflow * Update `GitVersion` tool to use `GitVersion.CommandLine` instead of `GitVersion.Tool` in `CakeBuildSample` * Refactor `GitVersion` usage in `BuildContext` and update tool URI in `CakeBuildSample` - Replaced `Version` property in `BuildContext` with a computed getter using `GetGitVersionSafe`. - Updated `GitVersion.Tool` URI scheme in `CakeBuildSample` to use `dotnet:` instead of `nuget:`. * Comment out `UsePackageInstaller` in `CakeBuildSample` and update tool installation logic * Add `InstallTools` method to simplify tool installation and refactor tool setup logic - Introduced `InstallTools` method in `ICakeHostBuilder` for streamlined tool installation. - Created `ToolInstallation`, `DotNetToolInstallation`, and `NuGetToolInstallation` classes for better type safety and tool configuration. - Refactored `CakeBuildSample` to use the new `InstallTools` API, replacing inline tool path and installation logic. * Refactor `BuildContext` to `CakeBuildContext` for improved clarity and consistency in context naming. * Replace Nuke build system with Cake.build and migrate corresponding build logic, settings, and configurations. * Set `TERM=xterm` and enable ANSI color redirection in integration workflow environments * Refactor `TestServerContext` to use `IHost` instead of `TestServer`'s built-in hosting and clean up unused package references in projects. * Simplify build script by removing `pipefail` option in `set` command. * Refactor build script to simplify .NET SDK setup and update integration workflow to use PowerShell build script * Update integration workflow to use `bash` instead of `sh` for NuGet push * Update integration workflow step names for consistency and clarity in build targets * Update integration workflow to use `cmd` for build commands instead of `sh` and `ps1` * Add "samples" as default source directory in `ICleanTaskSettings` and fix coverage report path in integration workflow * Remove deprecated Nuke build system configurations and update workflows for Cake.build integration. * Refactor tasks and settings to simplify syntax, enforce immutability, and add JetBrains annotations. * Set `TERM` and enable ANSI color redirection in all workflow environments; update GitVersion config for streamlined branch handling * Update release workflow to use `pack` target instead of `nugetpush` for build command for check functionality * Log version information (informational, assembly, file, and package versions) in build context output. * Remove CreativeCoders.NukeBuild and related components, actions, and configurations. Migrate to alternative build system. * Update pull-request workflow to use `-t pack` syntax for build command * Remove redundant `_testServer.Dispose()` call in `TestServerContext` deconstruction * Update GitVersion config: change pull-request mode to ContinuousDelivery, refine label, and set prevent-increment behavior * Refine GitVersion regex to group branch name in pull-request handling * Update GitVersion config: revise pull-request label and regex for better name handling
1 parent 702344f commit 46eb300

127 files changed

Lines changed: 1476 additions & 2726 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/integration.yml

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# ------------------------------------------------------------------------------
2-
# <auto-generated>
3-
#
4-
# This code was generated.
5-
#
6-
# - To turn off auto-generation set:
7-
#
8-
# [GitHubActions (AutoGenerate = false)]
9-
#
10-
# - To trigger manual generation invoke:
11-
#
12-
# nuke --generate-configuration GitHubActions_integration --host GitHubActions
13-
#
14-
# </auto-generated>
15-
# ------------------------------------------------------------------------------
16-
171
name: integration
182

193
on:
@@ -25,72 +9,71 @@ jobs:
259
ubuntu-latest:
2610
name: ubuntu-latest
2711
runs-on: ubuntu-latest
12+
env:
13+
TERM: xterm
14+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
2815
steps:
29-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
3017
with:
3118
fetch-depth: 0
32-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
19+
- name: 'Cache: ~/.nuget/packages'
3320
uses: actions/cache@v4
3421
with:
3522
path: |
36-
.nuke/temp
3723
~/.nuget/packages
3824
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
39-
- name: 'Run: DeployNuGet'
40-
run: ./build.cmd DeployNuGet
25+
- name: 'Build with target: NuGetPush'
4126
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
- name: 'Publish: coverage_report'
27+
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: ./build.cmd -t nugetpush
29+
- name: 'Publish: coverage-report'
4430
uses: actions/upload-artifact@v4
45-
if: runner.os == 'Linux'
4631
with:
47-
name: coverage_report
48-
path: .tests/coverage_report
32+
name: coverage-report-linux
33+
path: .tests/coverage-report
4934
windows-latest:
5035
name: windows-latest
5136
runs-on: windows-latest
37+
env:
38+
TERM: xterm
39+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
5240
steps:
53-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v5
5442
with:
5543
fetch-depth: 0
56-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
44+
- name: 'Cache: ~/.nuget/packages'
5745
uses: actions/cache@v4
5846
with:
5947
path: |
60-
.nuke/temp
6148
~/.nuget/packages
6249
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
63-
- name: 'Run: DeployNuGet'
64-
run: ./build.cmd DeployNuGet
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
- name: 'Build with target: Pack'
51+
run: ./build.cmd -t pack
6752
- name: 'Publish: coverage_report'
6853
uses: actions/upload-artifact@v4
69-
if: runner.os == 'Linux'
7054
with:
71-
name: coverage_report
72-
path: .tests/coverage_report
55+
name: coverage-report-windows
56+
path: .tests/coverage-report
7357
macos-latest:
7458
name: macos-latest
7559
runs-on: macos-latest
60+
env:
61+
TERM: xterm
62+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
7663
steps:
7764
- uses: actions/checkout@v4
7865
with:
7966
fetch-depth: 0
80-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
67+
- name: 'Cache: ~/.nuget/packages'
8168
uses: actions/cache@v4
8269
with:
8370
path: |
84-
.nuke/temp
8571
~/.nuget/packages
8672
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
87-
- name: 'Run: DeployNuGet'
88-
run: ./build.cmd DeployNuGet
89-
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
- name: 'Build with target: Pack'
74+
run: ./build.cmd -t pack
9175
- name: 'Publish: coverage_report'
9276
uses: actions/upload-artifact@v4
93-
if: runner.os == 'Linux'
9477
with:
95-
name: coverage_report
96-
path: .tests/coverage_report
78+
name: coverage-report-macos
79+
path: .tests/coverage-report

.github/workflows/main.yml

Lines changed: 25 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# ------------------------------------------------------------------------------
2-
# <auto-generated>
3-
#
4-
# This code was generated.
5-
#
6-
# - To turn off auto-generation set:
7-
#
8-
# [GitHubActions (AutoGenerate = false)]
9-
#
10-
# - To trigger manual generation invoke:
11-
#
12-
# nuke --generate-configuration GitHubActions_main --host GitHubActions
13-
#
14-
# </auto-generated>
15-
# ------------------------------------------------------------------------------
16-
171
name: main
182

193
on:
@@ -25,72 +9,71 @@ jobs:
259
ubuntu-latest:
2610
name: ubuntu-latest
2711
runs-on: ubuntu-latest
12+
env:
13+
TERM: xterm
14+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
2815
steps:
2916
- uses: actions/checkout@v4
3017
with:
3118
fetch-depth: 0
32-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
19+
- name: 'Cache: ~/.nuget/packages'
3320
uses: actions/cache@v4
3421
with:
3522
path: |
36-
.nuke/temp
3723
~/.nuget/packages
3824
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
39-
- name: 'Run: DeployNuGet'
40-
run: ./build.cmd DeployNuGet
25+
- name: 'Build with target: NuGetPush'
26+
run: ./build.cmd -t nugetpush
4127
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
NUGET_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4329
- name: 'Publish: coverage_report'
4430
uses: actions/upload-artifact@v4
45-
if: runner.os == 'Linux'
4631
with:
47-
name: coverage_report
48-
path: .tests/coverage_report
32+
name: coverage-report-linux
33+
path: .tests/coverage-report
4934
windows-latest:
5035
name: windows-latest
5136
runs-on: windows-latest
37+
env:
38+
TERM: xterm
39+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
5240
steps:
5341
- uses: actions/checkout@v4
5442
with:
5543
fetch-depth: 0
56-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
44+
- name: 'Cache: ~/.nuget/packages'
5745
uses: actions/cache@v4
5846
with:
5947
path: |
60-
.nuke/temp
6148
~/.nuget/packages
6249
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
63-
- name: 'Run: DeployNuGet'
64-
run: ./build.cmd DeployNuGet
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
- name: 'Build with target: Pack'
51+
run: ./build.cmd -t pack
6752
- name: 'Publish: coverage_report'
6853
uses: actions/upload-artifact@v4
69-
if: runner.os == 'Linux'
7054
with:
71-
name: coverage_report
72-
path: .tests/coverage_report
55+
name: coverage-report-windows
56+
path: .tests/coverage-report
7357
macos-latest:
7458
name: macos-latest
7559
runs-on: macos-latest
60+
env:
61+
TERM: xterm
62+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
7663
steps:
7764
- uses: actions/checkout@v4
7865
with:
7966
fetch-depth: 0
80-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
67+
- name: 'Cache: ~/.nuget/packages'
8168
uses: actions/cache@v4
8269
with:
8370
path: |
84-
.nuke/temp
8571
~/.nuget/packages
8672
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
87-
- name: 'Run: DeployNuGet'
88-
run: ./build.cmd DeployNuGet
89-
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
- name: 'Build with target: Pack'
74+
run: ./build.cmd -t pack
9175
- name: 'Publish: coverage_report'
9276
uses: actions/upload-artifact@v4
93-
if: runner.os == 'Linux'
9477
with:
95-
name: coverage_report
96-
path: .tests/coverage_report
78+
name: coverage-report-macos
79+
path: .tests/coverage-report

.github/workflows/pull-request.yml

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# ------------------------------------------------------------------------------
2-
# <auto-generated>
3-
#
4-
# This code was generated.
5-
#
6-
# - To turn off auto-generation set:
7-
#
8-
# [GitHubActions (AutoGenerate = false)]
9-
#
10-
# - To trigger manual generation invoke:
11-
#
12-
# nuke --generate-configuration GitHubActions_pull-request --host GitHubActions
13-
#
14-
# </auto-generated>
15-
# ------------------------------------------------------------------------------
16-
171
name: pull-request
182

193
on:
@@ -25,72 +9,69 @@ jobs:
259
ubuntu-latest:
2610
name: ubuntu-latest
2711
runs-on: ubuntu-latest
12+
env:
13+
TERM: xterm
14+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
2815
steps:
2916
- uses: actions/checkout@v4
3017
with:
3118
fetch-depth: 0
32-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
19+
- name: 'Cache: ~/.nuget/packages'
3320
uses: actions/cache@v4
3421
with:
3522
path: |
36-
.nuke/temp
3723
~/.nuget/packages
3824
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
39-
- name: 'Run: Rebuild, CodeCoverage, Pack'
40-
run: ./build.cmd Rebuild CodeCoverage Pack
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: 'Build with target: Pack'
26+
run: ./build.cmd -t pack
4327
- name: 'Publish: coverage_report'
4428
uses: actions/upload-artifact@v4
45-
if: runner.os == 'Linux'
4629
with:
47-
name: coverage_report
48-
path: .tests/coverage_report
30+
name: coverage-report-linux
31+
path: .tests/coverage-report
4932
windows-latest:
5033
name: windows-latest
5134
runs-on: windows-latest
35+
env:
36+
TERM: xterm
37+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
5238
steps:
5339
- uses: actions/checkout@v4
5440
with:
5541
fetch-depth: 0
56-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
42+
- name: 'Cache: ~/.nuget/packages'
5743
uses: actions/cache@v4
5844
with:
5945
path: |
60-
.nuke/temp
6146
~/.nuget/packages
6247
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
63-
- name: 'Run: Rebuild, CodeCoverage, Pack'
64-
run: ./build.cmd Rebuild CodeCoverage Pack
65-
env:
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
- name: 'Build with target: Pack'
49+
run: ./build.cmd -t pack
6750
- name: 'Publish: coverage_report'
6851
uses: actions/upload-artifact@v4
69-
if: runner.os == 'Linux'
7052
with:
71-
name: coverage_report
72-
path: .tests/coverage_report
53+
name: coverage-report-windows
54+
path: .tests/coverage-report
7355
macos-latest:
7456
name: macos-latest
7557
runs-on: macos-latest
58+
env:
59+
TERM: xterm
60+
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
7661
steps:
7762
- uses: actions/checkout@v4
7863
with:
7964
fetch-depth: 0
80-
- name: 'Cache: .nuke/temp, ~/.nuget/packages'
65+
- name: 'Cache: ~/.nuget/packages'
8166
uses: actions/cache@v4
8267
with:
8368
path: |
84-
.nuke/temp
8569
~/.nuget/packages
8670
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
87-
- name: 'Run: Rebuild, CodeCoverage, Pack'
88-
run: ./build.cmd Rebuild CodeCoverage Pack
89-
env:
90-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
- name: 'Build with target: Pack'
72+
run: ./build.cmd -t pack
9173
- name: 'Publish: coverage_report'
9274
uses: actions/upload-artifact@v4
93-
if: runner.os == 'Linux'
9475
with:
95-
name: coverage_report
96-
path: .tests/coverage_report
76+
name: coverage-report-macos
77+
path: .tests/coverage-report

0 commit comments

Comments
 (0)