Skip to content

Commit a402531

Browse files
committed
picking dotnet version from global.json
1 parent aed5974 commit a402531

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

.github/workflows/test-and-deploy.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
- name: Setup .NET Core SDK
2525
uses: actions/setup-dotnet@v3
2626
with:
27-
dotnet-version: 7.0.103
27+
global-json-file: global.json
2828

29-
- name: Remove dotnet 7 and 8
30-
run: sudo rm -rf /usr/share/dotnet/sdk/{7*,8*}
29+
# - name: Remove dotnet 7 and 8
30+
# run: sudo rm -rf /usr/share/dotnet/sdk/{7*,8*}
3131

3232
- name: Get installed dotnet version
3333
run: dotnet --version
@@ -68,12 +68,12 @@ jobs:
6868
- name: Setup .NET Core SDK
6969
uses: actions/setup-dotnet@v3
7070
with:
71-
dotnet-version: 7.0.103
71+
global-json-file: global.json
7272

7373
# actions/setup-dotnet@v3 will install .net6, .net7 and .net8 by default it will use latest version.
7474
# if any latest version of .net is released, delete that as well.
75-
- name: Remove dotnet 7 and 8
76-
run: sudo rm -rf /usr/share/dotnet/sdk/{7*,8*}
75+
# - name: Remove dotnet 7 and 8
76+
# run: sudo rm -rf /usr/share/dotnet/sdk/{7*,8*}
7777

7878
- name: Get installed dotnet version
7979
run: dotnet --version
@@ -113,13 +113,10 @@ jobs:
113113
- name: Setup .NET Core SDK
114114
uses: actions/setup-dotnet@v3
115115
with:
116-
dotnet-version: 7.0.103
116+
global-json-file: global.json
117117

118-
- name: Display installed dotnet versions
119-
run: ls /usr/share/dotnet/sdk/
120-
121-
- name: Remove dotnet 7 and 8
122-
run: sudo rm -rf /usr/share/dotnet/sdk/7* /usr/share/dotnet/sdk/8*
118+
# - name: Remove dotnet 7 and 8
119+
# run: sudo rm -rf /usr/share/dotnet/sdk/7* /usr/share/dotnet/sdk/8*
123120

124121
- name: Get installed dotnet version
125122
run: dotnet --version

global.json

Whitespace-only changes.

0 commit comments

Comments
 (0)