Skip to content

Commit 5ee5bb3

Browse files
committed
force correct c# to be installed
1 parent a0faf7a commit 5ee5bb3

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/dotnet.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ jobs:
1717
build:
1818

1919
runs-on: macos-latest
20-
20+
name: .NET ${{ matrix.dotnet }}
21+
strategy:
22+
matrix:
23+
dotnet:
24+
- 8.0.x # EOL: 2026-11-10
25+
- 7.0.x # EOL: 2024-05-14
26+
- 6.0.x # EOL: 2024-11-12
27+
# version support doc: https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
2128
steps:
2229
- uses: actions/checkout@v3
2330
with:
@@ -30,11 +37,13 @@ jobs:
3037
- uses: actions/checkout@v3
3138
with:
3239
path: getargv.cs
33-
# - name: Setup .NET
34-
# uses: actions/setup-dotnet@v3
35-
# with:
36-
# dotnet-version: 7.0.x
37-
# version support doc: https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
40+
- name: Setup .NET
41+
uses: actions/setup-dotnet@v4
42+
with:
43+
dotnet-version: ${{ matrix.dotnet }}
44+
- name: Create temporary global.json
45+
run: echo '{"sdk":{"version": "${{ steps.stepid.outputs.dotnet-version }}"}}' > ./global.json
46+
working-directory: getargv.cs
3847
- name: Restore dependencies
3948
run: dotnet restore
4049
working-directory: getargv.cs

0 commit comments

Comments
 (0)