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

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

>_ dotnet-env

Automatically setup .NET environment for actively used SDK versions

Usage

The action is typically used in combination with which-dotnet to keep the CI environment up-to-date with evolving .NET versions used in your repository projects.

If no previously persisted JSON file is provided, automatic discovery of used .NET SDK versions will be performed using which-dotnet.

It's recommended you set up a separate workflow that keeps a dotnet.json file up-to-date to speed-up your builds by avoiding dynamic discovery on every build.

Assuming your repository has the dotnet.json file in its default location (under ./.github), or has no versions file at all:

on:
  push:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: 🀘 checkout
        uses: actions/checkout@v4

      - name: βš™ dotnet
        uses: devlooped/actions-dotnet-env@v1

      - name: πŸ™ build
        run: dotnet build

If you use a different location for the versions file:

  - name: βš™ dotnet
    uses: devlooped/actions-dotnet-env@v1
    with:
      versions: ./dotnet-versions.json

In order to bootstrap the initial dotnet.json file, you can run the dotnet-env tool with the -o parameter, which initializes it at the default location ./.github/dotnet.json.

Sponsors

Clarius Org MFB Technologies, Inc. SandRock DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Reuben Swartz Jacob Foshee Eric Johnson Jonathan Ken Bonny Simon Cropp agileworks-eu Zheyu Shen Vezel ChilliCream 4OTC domischell Adrian Alonso torutek Ryan McCaffery Seika Logiciel Andrew Grant eska-gmbh Geodata AS

Sponsor this project

Learn more about GitHub Sponsors

About

Setup .NET environment

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors