actions / starter-workflows

Accelerating new GitHub Actions workflows
https://github.com/features/actions
Other
8.59k stars 5.07k forks source link

Setup-Dotnet: Update all workflows to Setup-Dotnet V4 #2382

Open jsoref opened 2 months ago

jsoref commented 2 months ago

Workflows should be using setup-dotnet v4 (roughly https://github.com/actions/setup-dotnet/releases/tag/v4.0.0, plus later updates). It doesn't have breaking changes. Some workflows in this repository are already using it. There's no reason to inconsistently use v2/v3/v4.

There is a "breaking change" between v2 and v3 https://github.com/actions/setup-dotnet/blob/main/docs/adrs/v3-setup-dotnet.md#breaking-changes, but the only instance of v2 is in a comment, so this is harmless. The step would only be needed for private runners without dotnet, or with an old dotnet -- in any case, afaict based on the release notes, this behavior would be fine since the tool in question just wants "new enough" not "precise".

Pre-requisites


Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.


Tasks

For all workflows, the workflow:

For CI workflows, the workflow:

For Code Scanning workflows, the workflow:

Some general notes: