You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-3Lines changed: 39 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,30 @@ The `dotnet-version` input supports following syntax:
57
57
- **A.B** or **A.B.x** (e.g. 8.0, 8.0.x) - installs the latest patch version of .NET SDK on the channel `8.0`, including prerelease versions (preview, rc)
58
58
- **A** or **A.x** (e.g. 8, 8.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
59
59
- **A.B.Cxx** (e.g. 8.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).
60
+
- **latest** - dynamically resolves to the highest active .NET SDK version. By default, it installs the latest **stable (GA)** version (excluding previews and end-of-life releases). Can be combined with `dotnet-channel` and `dotnet-quality`.
60
61
62
+
## Using with `dotnet-channel` input
63
+
64
+
The optional `dotnet-channel` input specifies the source channel for the installation. Supported values:
65
+
66
+
| Value | Description |
67
+
|-------|-------------|
68
+
| `STS` | The most recent Standard Term Support release |
69
+
| `LTS` | The most recent Long Term Support release |
70
+
| `A.B` (e.g. `8.0`) | A specific release channel |
71
+
| `A.B.Cxx` (e.g. `8.0.1xx`) | A specific SDK release (available since 5.0) |
72
+
73
+
> **Note**: The `dotnet-channel` input is only applied when `dotnet-version` is set to `latest`. If used with a specific version, a warning will be logged and the channel input will be ignored.
74
+
75
+
**Install latest LTS version:**
76
+
```yaml
77
+
steps:
78
+
- uses: actions/checkout@v6
79
+
- uses: actions/setup-dotnet@v5
80
+
with:
81
+
dotnet-version: latest
82
+
dotnet-channel: LTS
83
+
```
61
84
62
85
## Using the `architecture` input
63
86
Using 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).
@@ -77,9 +100,10 @@ steps:
77
100
```
78
101
79
102
## Using the `dotnet-quality` input
80
-
This input sets up the action to install the latest build of the specified quality in the channel. The possible values of `dotnet-quality` are: **daily**, **signed**, **validated**, **preview**, **ga**.
81
103
82
-
> **Note**: `dotnet-quality` input can be used only with .NET SDK version in 'A.B', 'A.B.x', 'A', 'A.x' and 'A.B.Cxx' formats where the major version is higher than 5. In other cases, `dotnet-quality` input will be ignored.
104
+
The `dotnet-quality` input installs the latest build of the specified quality in the channel. Supported values: `daily`, `preview`, `ga`.
105
+
106
+
> **Note**: When used with a specific SDK version, `dotnet-quality` supports only `A.B`, `A.B.x`, `A`, `A.x`, and `A.B.Cxx` formats where the major version is higher than 5. For all other formats, `dotnet-quality` will be ignored.
83
107
84
108
```yml
85
109
steps:
@@ -91,6 +115,18 @@ steps:
91
115
- run: dotnet build <my project>
92
116
```
93
117
118
+
`dotnet-quality` can also be combined with `dotnet-version: latest` and `dotnet-channel` to target specific builds such as the latest `daily` build from the `LTS` channel.
119
+
120
+
```yaml
121
+
steps:
122
+
- uses: actions/checkout@v6
123
+
- uses: actions/setup-dotnet@v5
124
+
with:
125
+
dotnet-version: latest
126
+
dotnet-channel: LTS
127
+
dotnet-quality: daily
128
+
```
129
+
94
130
## Using the `global-json-file` input
95
131
`setup-dotnet`action can read .NET SDK version from a `global.json` file. Input `global-json-file` is used for specifying the path to the `global.json`. If the file that was supplied to `global-json-file` input doesn't exist, the action will fail with error.
96
132
@@ -371,4 +407,4 @@ The scripts and documentation in this project are released under the [MIT Licens
371
407
372
408
## Contributions
373
409
374
-
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
410
+
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
0 commit comments