Update docs to v2 (#278)

* Update docs to v2

* Bump checkout action to v3

* Update installer scripts

* Replace v2 to vX on the docs, minor fixes

* Remove extra whitespace
This commit is contained in:
Vladimir Safonkin
2022-04-01 16:48:47 +03:00
committed by GitHub
parent 9211491ffb
commit 53d632b5c0
7 changed files with 66 additions and 64 deletions

View File

@ -1,8 +1,6 @@
# setup-dotnet
<p align="left">
<a href="https://github.com/actions/setup-dotnet"><img alt="GitHub Actions status" src="https://github.com/actions/setup-dotnet/workflows/Main%20workflow/badge.svg"></a>
</p>
[![GitHub Actions Status](https://github.com/actions/setup-dotnet/workflows/Main%20workflow/badge.svg)](https://github.com/actions/setup-dotnet)
This action sets up a [.NET CLI](https://github.com/dotnet/sdk) environment for use in actions by:
@ -23,8 +21,8 @@ See [action.yml](action.yml)
Basic:
```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
- run: dotnet build <my project>
@ -34,9 +32,9 @@ Multiple versions:
```yml
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
3.1.x
@ -46,8 +44,8 @@ steps:
Preview version:
```yml
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
include-prerelease: true
@ -64,9 +62,9 @@ jobs:
dotnet: [ '2.1.x', '3.1.x', '5.0.x' ]
name: Dotnet ${{ matrix.dotnet }} sample
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet }}
- run: dotnet build <my project>
@ -79,13 +77,13 @@ jobs:
runs-on: ubuntu-latest
name: Dotnet Side by Side testing sample
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: '2.1.x'
- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v2
with:
dotnet-version: '3.1.x'
- run: dotnet build <my project>
@ -95,9 +93,9 @@ jobs:
Authentication for nuget feeds:
```yaml
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Authenticates packages to push to GPR
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '3.1.x' # SDK Version to use.
source-url: https://nuget.pkg.github.com/<owner>/index.json
@ -110,7 +108,7 @@ steps:
run: dotnet nuget push <my project>/bin/Release/*.nupkg
# Authenticates packages to push to Azure Artifacts
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v2
with:
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
env:
@ -120,7 +118,7 @@ steps:
# Authenticates packages to push to nuget.org.
# It's only the way to push a package to nuget.org feed for macOS/Linux machines due to API key config store limitations.
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v2
with:
dotnet-version: 3.1.x
- name: Publish the package to nuget.org
@ -145,7 +143,7 @@ build:
DOTNET_NOLOGO: true
steps:
- uses: actions/checkout@main
- uses: actions/setup-dotnet@v1
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '3.1.x' # SDK Version to use.
```