Files
actions/csharp-publish
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-publish

C# Publish

Description

Publishes a C# project to GitHub Packages.

Inputs

name description required default
dotnet-version

Version of .NET SDK to use.

false ""
namespace

GitHub namespace for the package.

true ivuorinen
token

GitHub token with package write permissions

false ""

Outputs

name description
publish_status

Overall publish status (success/failure)

package_version

Version of the published package

package_url

URL of the published package

Runs

This action is a composite action.

Usage

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

    namespace:
    # GitHub namespace for the package.
    #
    # Required: true
    # Default: ivuorinen

    token:
    # GitHub token with package write permissions
    #
    # Required: false
    # Default: ""