Skip to content
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

setup-dotnet

A wrapper around the official ations/setup-dotnet action with extra features that aren't yet implemented.

  1. Sets DOTNET_INSTALL_DIR based on the OS so existing sdks are used when available (actions/setup-dotnet#284, actions/setup-dotnet#208)
  2. Strips comments from the global.json before calling actions/setup-dotnet and then restores them (actions/setup-dotnet#257)

Usage

Basic usage with SDK version from the global.json.

- name: Set up .NET
  uses: xt0rted/setup-dotnet@v1.0.0

Specifying a single SDK version to use.

- name: Set up .NET
  uses: xt0rted/setup-dotnet@v1.0.0
  with
    dotnet-version: 6.0.201

Specifying multiple SDK versions to use.

- name: Set up .NET
  uses: xt0rted/setup-dotnet@v1.0.0
  with
    dotnet-version: |
      3.1.417
      5.0.406
      6.0.201

Speficying a custom source and auth token.

- name: Set up .NET
  uses: xt0rted/setup-dotnet@v1.0.0
  with:
    source-url: https://nuget.pkg.github.com/xt0rted/index.json
    nuget_auth_token: ${{ secrets.GITHUB_TOKEN }}

ℹ️ This action requires passing nuget_auth_token as an input not an environment variable.

All inputs supported by actions/setup-dotnet are supported and passed through to it. The full list of supported inputs can be seen in the action.yml file.

About

A wrapper around the official actions/setup-dotnet action with extra features

Resources

License

Stars

Watchers

Forks

Packages

No packages published