From 9a0437f372734b04439c2e7ed99935abeec2fbd0 Mon Sep 17 00:00:00 2001 From: IvanZosimov Date: Wed, 28 Sep 2022 16:43:09 +0200 Subject: [PATCH] Update documentation --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index aea9f83..87fbf99 100644 --- a/README.md +++ b/README.md @@ -147,11 +147,11 @@ steps: ### `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** -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 - uses: actions/setup-dotnet@v3 @@ -163,7 +163,7 @@ In case of a single version installation, `dotnet-version` contains the version **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 - uses: actions/setup-dotnet@v3 @@ -174,7 +174,20 @@ In case of a multiple version installation, `dotnet-version` contains the latest 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