mirror of
https://github.com/actions/setup-dotnet.git
synced 2026-08-31 13:03:33 +01:00
Update actions/checkout to v7 and actions/setup-dotnet to v6 in README examples
This commit is contained in:
68
README.md
68
README.md
@@ -29,8 +29,8 @@ See [action.yml](action.yml)
|
|||||||
**Basic**:
|
**Basic**:
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
- run: dotnet build <my project>
|
- run: dotnet build <my project>
|
||||||
@@ -40,9 +40,9 @@ steps:
|
|||||||
**Multiple version installation**:
|
**Multiple version installation**:
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v5
|
uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
8.0.x
|
8.0.x
|
||||||
@@ -75,8 +75,8 @@ The optional `dotnet-channel` input specifies the source channel for the install
|
|||||||
**Install latest LTS version:**
|
**Install latest LTS version:**
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: latest
|
dotnet-version: latest
|
||||||
dotnet-channel: LTS
|
dotnet-channel: LTS
|
||||||
@@ -88,9 +88,9 @@ Using the architecture input, it is possible to specify the required .NET SDK ar
|
|||||||
**Example: Install multiple SDK versions for a specific architecture**
|
**Example: Install multiple SDK versions for a specific architecture**
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup dotnet (x86)
|
- name: Setup dotnet (x86)
|
||||||
uses: actions/setup-dotnet@v5
|
uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
8.0.x
|
8.0.x
|
||||||
@@ -107,8 +107,8 @@ The `dotnet-quality` input installs the latest build of the specified quality in
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
dotnet-quality: 'preview'
|
dotnet-quality: 'preview'
|
||||||
@@ -119,8 +119,8 @@ steps:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: latest
|
dotnet-version: latest
|
||||||
dotnet-channel: LTS
|
dotnet-channel: LTS
|
||||||
@@ -134,8 +134,8 @@ steps:
|
|||||||
|
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
global-json-file: csharp/global.json
|
global-json-file: csharp/global.json
|
||||||
- run: dotnet build <my project>
|
- run: dotnet build <my project>
|
||||||
@@ -153,8 +153,8 @@ The action searches for [NuGet Lock files](https://learn.microsoft.com/nuget/con
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.x
|
dotnet-version: 8.x
|
||||||
cache: true
|
cache: true
|
||||||
@@ -178,8 +178,8 @@ steps:
|
|||||||
env:
|
env:
|
||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.x
|
dotnet-version: 8.x
|
||||||
cache: true
|
cache: true
|
||||||
@@ -192,8 +192,8 @@ steps:
|
|||||||
env:
|
env:
|
||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.x
|
dotnet-version: 8.x
|
||||||
cache: true
|
cache: true
|
||||||
@@ -212,9 +212,9 @@ jobs:
|
|||||||
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
|
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
|
||||||
name: Dotnet ${{ matrix.dotnet }} sample
|
name: Dotnet ${{ matrix.dotnet }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v5
|
uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ matrix.dotnet }}
|
dotnet-version: ${{ matrix.dotnet }}
|
||||||
- name: Execute dotnet
|
- name: Execute dotnet
|
||||||
@@ -232,9 +232,9 @@ jobs:
|
|||||||
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
|
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
|
||||||
name: Dotnet ${{ matrix.dotnet }} sample
|
name: Dotnet ${{ matrix.dotnet }} sample
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- name: Setup dotnet
|
- name: Setup dotnet
|
||||||
uses: actions/setup-dotnet@v5
|
uses: actions/setup-dotnet@v6
|
||||||
id: stepid
|
id: stepid
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ matrix.dotnet }}
|
dotnet-version: ${{ matrix.dotnet }}
|
||||||
@@ -250,8 +250,8 @@ jobs:
|
|||||||
### Github Package Registry (GPR)
|
### Github Package Registry (GPR)
|
||||||
```yml
|
```yml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
source-url: https://nuget.pkg.github.com/<owner>/index.json
|
source-url: https://nuget.pkg.github.com/<owner>/index.json
|
||||||
@@ -266,7 +266,7 @@ steps:
|
|||||||
|
|
||||||
### Azure Artifacts
|
### Azure Artifacts
|
||||||
```yml
|
```yml
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
|
source-url: https://pkgs.dev.azure.com/<your-organization>/_packaging/<your-feed-name>/nuget/v3/index.json
|
||||||
env:
|
env:
|
||||||
@@ -277,7 +277,7 @@ steps:
|
|||||||
|
|
||||||
### nuget.org
|
### nuget.org
|
||||||
```yml
|
```yml
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.x
|
dotnet-version: 8.0.x
|
||||||
- name: Publish the package to nuget.org
|
- name: Publish the package to nuget.org
|
||||||
@@ -294,7 +294,7 @@ The `workloads` input allows you to install .NET workloads as part of the SDK se
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Setup .NET with workloads
|
- name: Setup .NET with workloads
|
||||||
uses: actions/setup-dotnet@v5
|
uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: '9.0.x'
|
dotnet-version: '9.0.x'
|
||||||
workloads: workload1, workload2 # Specify the workloads required for the project, such as wasm-tools, maui, etc.
|
workloads: workload1, workload2 # Specify the workloads required for the project, such as wasm-tools, maui, etc.
|
||||||
@@ -316,7 +316,7 @@ Using the **dotnet-version** output it's possible to get the installed by the ac
|
|||||||
In case of a single version installation, the `dotnet-version` output 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@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
id: stepid
|
id: stepid
|
||||||
with:
|
with:
|
||||||
dotnet-version: 8.0.416
|
dotnet-version: 8.0.416
|
||||||
@@ -328,7 +328,7 @@ In case of a single version installation, the `dotnet-version` output contains t
|
|||||||
In case of a multiple version installation, the `dotnet-version` output 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@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
id: stepid
|
id: stepid
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
@@ -341,7 +341,7 @@ In case of a multiple version installation, the `dotnet-version` output contains
|
|||||||
When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`.
|
When the `dotnet-version` input is used along with the `global-json-file` input, the `dotnet-version` output contains the version resolved from the `global.json`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
id: stepid
|
id: stepid
|
||||||
with:
|
with:
|
||||||
dotnet-version: |
|
dotnet-version: |
|
||||||
@@ -381,8 +381,8 @@ build:
|
|||||||
DOTNET_INSTALL_DIR: "path/to/directory"
|
DOTNET_INSTALL_DIR: "path/to/directory"
|
||||||
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v7
|
||||||
- uses: actions/setup-dotnet@v5
|
- uses: actions/setup-dotnet@v6
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
cache: true
|
cache: true
|
||||||
|
|||||||
Reference in New Issue
Block a user