Skip to content

Commit 8b56809

Browse files
committed
Pin .NET SDK version and enhance workflows
Updated the .NET version in Release.yml and build.yml to 10.0.100 for consistency. Added steps to display .NET info before and after setup in workflows for better debugging. Introduced global.json to pin SDK version, enforce rollForward policy, and disallow prerelease versions.
1 parent 9b5430b commit 8b56809

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

.github/workflows/Release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
env:
8-
NET_VERSION: 10.*.*
8+
NET_VERSION: 10.0.100
99
PROJECT_PATH: 'Scr/IeuanWalker.Maui.StateButton.csproj'
1010
NUGET_PATH: './**/IeuanWalker.Maui.StateButton.${{ github.event.release.tag_name }}.nupkg'
1111

@@ -15,6 +15,9 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18+
19+
- name: Display dotnet info
20+
run: dotnet --info
1821

1922
- name: Setup .NET ${{ env.NET_VERSION }}
2023
uses: actions/setup-dotnet@v4
@@ -24,6 +27,9 @@ jobs:
2427
- name: Install .NET MAUI ${{ env.NET_VERSION }}
2528
run: dotnet workload install maui --ignore-failed-sources
2629

30+
- name: Display dotnet info
31+
run: dotnet --info
32+
2733
- name: Restore dependencies
2834
run: dotnet restore ${{ env.PROJECT_PATH }}
2935

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
- cron: '0 0 1 */3 *' # Every 3 months
1010

1111
env:
12-
NET_VERSION: 10.*.*
12+
NET_VERSION: 10.0.100
1313
PROJECT_PATH: 'Scr/IeuanWalker.Maui.StateButton.csproj'
1414
NUGET_PATH: './**/IeuanWalker.Maui.StateButton.1.0.0.nupkg'
1515

@@ -19,6 +19,9 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22+
23+
- name: Display dotnet info
24+
run: dotnet --info
2225

2326
- name: Setup .NET ${{ env.NET_VERSION }}
2427
uses: actions/setup-dotnet@v4
@@ -27,6 +30,9 @@ jobs:
2730

2831
- name: Install .NET MAUI ${{ env.NET_VERSION }}
2932
run: dotnet workload install maui --ignore-failed-sources
33+
34+
- name: Display dotnet info
35+
run: dotnet --info
3036

3137
- name: Restore dependencies
3238
run: dotnet restore ${{ env.PROJECT_PATH }}

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.100",
4+
"rollForward": "latestFeature",
5+
"allowPrerelease": false
6+
}
7+
}

0 commit comments

Comments
 (0)