Skip to content

Commit ec54f80

Browse files
committed
CI: use the correct version of dotnet-sdk everywhere
1 parent e4dc94a commit ec54f80

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

.github/workflows/docs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,20 @@ jobs:
2222
name: github-pages
2323
url: ${{ steps.deployment.outputs.page_url }}
2424
runs-on: ubuntu-24.04
25+
env:
26+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
27+
DOTNET_NOLOGO: 1
28+
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
2529
steps:
2630
- name: Check out the sources
2731
uses: actions/checkout@v6
2832
- name: Set up .NET SDK
2933
uses: actions/setup-dotnet@v5
34+
- name: Cache NuGet packages
35+
uses: actions/cache@v5
3036
with:
31-
dotnet-version: 8.x
37+
key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.*proj', '**/*.props') }}
38+
path: ${{ env.NUGET_PACKAGES }}
3239
- run: dotnet tool restore
3340
- run: dotnet docfx docs/docfx.json
3441
- name: Upload artifact

.github/workflows/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,20 @@ jobs:
2222
permissions:
2323
contents: write
2424
runs-on: ubuntu-24.04
25+
env:
26+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
27+
DOTNET_NOLOGO: 1
28+
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
2529
steps:
2630
- name: Check out the sources
2731
uses: actions/checkout@v6
32+
- name: Set up .NET SDK
33+
uses: actions/setup-dotnet@v5
34+
- name: Cache NuGet packages
35+
uses: actions/cache@v5
36+
with:
37+
key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.*proj', '**/*.props') }}
38+
path: ${{ env.NUGET_PACKAGES }}
2839
- id: version
2940
name: Get version
3041
shell: pwsh

scripts/github-actions.fsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,8 @@ let workflows = [
120120
name "Release"
121121
yield! mainTriggers
122122
onPushTags "v*"
123-
job "nuget" [
123+
dotNetJob "nuget" [
124124
runsOn ubuntu
125-
checkOut
126125
jobPermission(PermissionKind.Contents, AccessKind.Write)
127126

128127
let configuration = "Release"
@@ -200,17 +199,9 @@ let workflows = [
200199
group = "pages",
201200
cancelInProgress = false
202201
)
203-
job "publish-docs" [
202+
dotNetJob "publish-docs" [
204203
environment(name = "github-pages", url = "${{ steps.deployment.outputs.page_url }}")
205204
runsOn "ubuntu-24.04"
206-
checkOut
207-
step(
208-
name = "Set up .NET SDK",
209-
usesSpec = Auto "actions/setup-dotnet",
210-
options = Map.ofList [
211-
"dotnet-version", "8.x"
212-
]
213-
)
214205
step(
215206
run = "dotnet tool restore"
216207
)

0 commit comments

Comments
 (0)