mirror of
https://github.com/actions/setup-dotnet.git
synced 2025-08-18 14:45:09 +00:00
Update documentation
This commit is contained in:
parent
1717505b70
commit
9a0437f372
19
README.md
19
README.md
@ -147,11 +147,11 @@ steps:
|
|||||||
|
|
||||||
### `dotnet-version`
|
### `dotnet-version`
|
||||||
|
|
||||||
Using **dotnet-version** output it's possible to get the installed by action .NET SDK version.
|
Using the **dotnet-version** output it's possible to get the installed by the action .NET SDK version.
|
||||||
|
|
||||||
**Single version installation**
|
**Single version installation**
|
||||||
|
|
||||||
In case of a single version installation, `dotnet-version` contains the version that is installed by the action.
|
In case of a single version installation, the `dotnet-version` output contains the version that is installed by the action.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/setup-dotnet@v3
|
- uses: actions/setup-dotnet@v3
|
||||||
@ -163,7 +163,7 @@ In case of a single version installation, `dotnet-version` contains the version
|
|||||||
|
|
||||||
**Multiple version installation**
|
**Multiple version installation**
|
||||||
|
|
||||||
In case of a multiple version installation, `dotnet-version` contains the latest version that is installed by the action.
|
In case of a multiple version installation, the `dotnet-version` output contains the latest version that is installed by the action.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/setup-dotnet@v3
|
- uses: actions/setup-dotnet@v3
|
||||||
@ -174,7 +174,20 @@ In case of a multiple version installation, `dotnet-version` contains the latest
|
|||||||
5.0.408
|
5.0.408
|
||||||
- run: echo '${{ steps.cp310.outputs.dotnet-version }}' # outputs 5.0.408
|
- run: echo '${{ steps.cp310.outputs.dotnet-version }}' # outputs 5.0.408
|
||||||
```
|
```
|
||||||
|
**Installation from global.json**
|
||||||
|
|
||||||
|
When the `dotnet-version` input is used along withthe `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- uses: actions/setup-dotnet@v3
|
||||||
|
id: cp310
|
||||||
|
with:
|
||||||
|
dotnet-version: |
|
||||||
|
3.1.422
|
||||||
|
5.0.408
|
||||||
|
global-json-file: "./global.json" # contains version 2.2.207
|
||||||
|
- run: echo '${{ steps.cp310.outputs.dotnet-version }}' # outputs 2.2.207
|
||||||
|
```
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user