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

11 Commits

Folders and files

Repository files navigation

🤌 which-dotnet

Determines which versions of .NET are in use and persists them to a JSON file.

Usage

The action is typically used to keep an up-to-date manifest of dotnet versions in use in the current repository, so the dotnet-env can automatically set up the environment via a single step.

on:
  workflow_dispatch:
  push:
    branches: 
      - main
    paths:
      - '**/*.*proj'

jobs:
  which-dotnet:
    runs-on: ubuntu-latest 
    permissions:
      contents: write
      pull-requests: write
    steps:
      - name: 🤘 checkout
        uses: actions/checkout@v4

      - name: 🤌 dotnet
        uses: devlooped/actions-which-dotnet@v1

      - name: ✍ pull request
        uses: peter-evans/create-pull-request@v7
        with:
          base: main
          branch: which-dotnet
          delete-branch: true
          labels: dependencies
          title: "⚙ Update dotnet versions"
          body: "Update dotnet versions"
          commit-message: "Update dotnet versions"

The action will output a JSON file containing an array of the major versions used by dotnet projects (`**/*.*proj) in the entire repository, such as:

[
  "6.x", 
  "8.x",
  "10.x"
]

The default JSON output location is ./.github/dotnet.json. This can be changed by specifying the versions parameter:

    - name: 🤌 dotnet
      uses: devlooped/actions-which-dotnet@v1
      with:
        versions: ./dotnet.json

Sponsors

Clarius Org MFB Technologies, Inc. SandRock DRIVE.NET, Inc. Keith Pickford Thomas Bolon 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

Determines which .NET SDKs are in use

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors