Files
actions/csharp-build
Ismo Vuorinen de40e0cdc6 refactor(csharp): migrate to native setup-dotnet caching
Replace common-cache with native caching in C# actions for better
performance and maintainability.

csharp-build changes:
- Add cache: true and cache-dependency-path to setup-dotnet
- Remove redundant common-cache step
- Simplify restore logic, remove cache-hit conditionals

csharp-publish changes:
- Add cache: true and cache-dependency-path to setup-dotnet
- Remove redundant common-cache step
- Simplify restore logic, use step-security/retry for restore

Benefits:
- Native caching is more efficient and better maintained
- Reduces common-cache dependencies from 7 to 5 actions
- setup-dotnet handles NuGet package caching automatically
- Cleaner workflow without complex conditional logic

Phase 2 complete: Reduced common-cache usage from 11 to 5 actions.
2025-11-20 13:39:05 +02:00
..

ivuorinen/actions/csharp-build

C# Build

Description

Builds and tests C# projects.

Inputs

name description required default
dotnet-version

Version of .NET SDK to use.

false ""
max-retries

Maximum number of retry attempts for dotnet restore operations

false 3
token

GitHub token for authentication

false ""

Outputs

name description
build_status

Build completion status (success/failure)

test_status

Test execution status (success/failure/skipped)

dotnet_version

Version of .NET SDK used

artifacts_path

Path to build artifacts

test_results_path

Path to test results

Runs

This action is a composite action.

Usage

- uses: ivuorinen/actions/csharp-build@main
  with:
    dotnet-version:
    # Version of .NET SDK to use.
    #
    # Required: false
    # Default: ""

    max-retries:
    # Maximum number of retry attempts for dotnet restore operations
    #
    # Required: false
    # Default: 3

    token:
    # GitHub token for authentication
    #
    # Required: false
    # Default: ""