Skip to content

dotnet-env

Actions
Automatically setup .NET environment for actively used SDK versions
v1.0
Latest
Star (0)

Tags

 (1)

>_ 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. Torutek DRIVE.NET, Inc. Keith Pickford Thomas Bolon Kori Francis Toni Wenzel Uno Platform Dan Siegel Reuben Swartz Jacob Foshee Eric Johnson David JENNI Jonathan Charley Wu Ken Bonny Simon Cropp agileworks-eu sorahex Zheyu Shen Vezel ChilliCream 4OTC Vincent Limo Jordan S. Jones domischell Mauricio Scheffer Justin Wendlandt Adrian Alonso Michael Hagedorn

Sponsor this project  

Learn more about GitHub Sponsors

dotnet-env is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Automatically setup .NET environment for actively used SDK versions
v1.0
Latest

Tags

 (1)

dotnet-env is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.