Bump eslint-plugin-jest from 29.15.2 to 29.16.6 (#771)
Bumps eslint-plugin-jest from 29.15.2 to 29.16.6.
updated-dependencies:
- dependency-name: eslint-plugin-jest dependency-version: 29.16.0 dependency-type: direct:development update-type: version-update:semver-minor …
Signed-off-by: dependabot[bot] support@github.com Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
setup-dotnet
This action sets up a .NET CLI environment for use in actions by:
What’s new in V6
@actions/*packages. No changes to action inputs, outputs, or behavior.Breaking changes in V5
For more details, see the full release notes on the release page
Usage
See action.yml
Basic:
Multiple version installation:
Supported version syntax
The
dotnet-versioninput supports following syntax:8.0, including prerelease versions (preview, rc).NET 5.0release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).dotnet-channelanddotnet-quality.Using with
dotnet-channelinputThe optional
dotnet-channelinput specifies the source channel for the installation. Supported values:STSLTSA.B(e.g.8.0)A.B.Cxx(e.g.8.0.1xx)Install latest LTS version:
Using the
architectureinputUsing the architecture input, it is possible to specify the required .NET SDK architecture. Possible values:
x64,x86,arm64,amd64,arm,s390x,ppc64le,riscv64. If the input is not specified, the architecture defaults to the host OS architecture (not all of the architectures are available on all platforms).Example: Install multiple SDK versions for a specific architecture
Using the
dotnet-qualityinputThe
dotnet-qualityinput installs the latest build of the specified quality in the channel. Supported values:daily,preview,ga. For more details about quality options, see the official .NET documentation.dotnet-qualitycan also be combined withdotnet-version: latestanddotnet-channelto target specific builds such as the latestdailybuild from theLTSchannel.Using the
global-json-fileinputsetup-dotnetaction can read .NET SDK version from aglobal.jsonfile. Inputglobal-json-fileis used for specifying the path to theglobal.json. If the file that was supplied toglobal-json-fileinput doesn’t exist, the action will fail with error.Caching NuGet Packages
The action has a built-in functionality for caching and restoring dependencies. It uses toolkit/cache under the hood for caching global packages data but requires less configuration settings. The
cacheinput is optional, and caching is turned off by default.The action searches for NuGet Lock files (
packages.lock.json) in the repository root, calculates their hash and uses it as a part of the cache key. If lock file does not exist, this action throws error. Usecache-dependency-pathfor cases when multiple dependency files are used, or they are located in different subdirectories.Reduce caching size
Caching NuGet packages in monorepos
Matrix Testing
Using
setup-dotnetit’s possible to use matrix syntax to install several versions of .NET SDK:Matrix testing with temporary global.json creation
Setting up authentication for nuget feeds
Github Package Registry (GPR)
Azure Artifacts
nuget.org
Using the
workloadsinputThe
workloadsinput allows you to install .NET workloads as part of the SDK setup. Workloads provide additional platform tools and dependencies for frameworks. This action automatically runsdotnet workload updatebefore installing the specified workloads to ensure manifests are refreshed and existing workloads are updated to their latest compatible versions.Using the
check-latestinputBy default (
check-latest: true) the action resolves and installs the latest version matching the request online, which is the historical behavior. Withcheck-latest: falseit first looks for an SDK already installed underDOTNET_INSTALL_DIRand reuses it, skipping SDK resolution and download — useful for air-gapped or preloaded runners (thecacheandworkloadsinputs still use the network). If none matches, it installs online as usual.An installed SDK is reused only when it matches the requested spec (
A.B.C,A.B,A.B.x,A.B.Cxx,A,A.xorlatest;x,Xand*interchange except in a feature band, which is lowercaseCxx), satisfiesdotnet-quality, is not older than thesdk.versiondeclared inglobal.json, and sits next to a runnabledotnetexecutable. As online,dotnet-qualityis ignored for a fullA.B.Crequest, so such a request always resolves to a GA SDK. Cross-architecture requests,latestwith anLTSorSTSchannel, and a bare wildcard always install online.When the request comes from
global.json, the SDK is picked the way the .NET resolver picks one:latestPatch,latestFeature,latestMinorandlatestMajortake the highest SDK the policy allows, whilefeature,minorandmajorroll forward to the nearest higher feature band, minor or major and then take its latest patch.patch— the default whenrollForwardis omitted — prefers the declared version, otherwise the latest patch in its band.disableand a prereleasesdk.versionrequire an exact match, andallowPrereleaseis not used:dotnet-qualityis the only prerelease control.Setting
check-latestfrom the environmentWhen the input is not set, the action reads the
DOTNET_CHECK_LATESTenvironment variable (trueorfalse, case-insensitive; an unsupported value warns and is ignored), which covers workflows you cannot edit. Setting it on a self-hosted runner alongside SDKs preinstalled underDOTNET_INSTALL_DIRlets those workflows run without reachingaka.ms,builds.dotnet.microsoft.comorci.dot.net. It applies to every job on that runner, so a dedicated runner is recommended; any workflow can still override it with an explicitcheck-latestinput.Outputs and environment variables
Outputs
dotnet-versionUsing the dotnet-version output it’s possible to get the installed by the action .NET SDK version.
Single version installation
In case of a single version installation, the
dotnet-versionoutput contains the version that is installed by the action.Multiple version installation
In case of a multiple version installation, the
dotnet-versionoutput contains the latest version that is installed by the action.Installation from global.json
When the
dotnet-versioninput is used along with theglobal-json-fileinput, thedotnet-versionoutput contains the version resolved from theglobal.json.cache-hitA boolean value to indicate an exact match was found for the cache key (follows actions/cache)
Environment variables
Some environment variables may be necessary for your particular case or to improve logging. Some examples are listed below, but the full list with complete details can be found here: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables
check-latestinput, for workflows that cannot set it. Ignored when the input is set.global-packagesfolderThe default values of the
DOTNET_INSTALL_DIRandNUGET_PACKAGESenvironment variables depend on the operation system which is used on a runner: | Operation system |DOTNET_INSTALL_DIR|NUGET_PACKAGES| | ———– | ———– | ———– | | Windows |C:\Program Files\dotnet|%userprofile%\.nuget\packages| | Ubuntu |/usr/share/dotnet|~/.nuget/packages| | macOS |/Users/runner/.dotnet|~/.nuget/packages|Example usage of environment variable:
You can also set
DOTNET_INSTALL_DIRto a value based on runtime variables, such as$HOME/.dotnetor${{ runner.temp }}/.dotnetbefore thesetup-dotnetstep:Recommended permissions
When using the
setup-dotnetaction in your GitHub Actions workflow, it is recommended to set the following permissions to ensure proper functionality:License
The scripts and documentation in this project are released under the MIT License
Contributions
Contributions are welcome! See Contributor’s Guide