Skip to content

Commit e004931

Browse files
authored
feat: Update to .NET 10 (#429)
* chore: Version bumped to .NET 10 * feat: TargetFramework updated * chore: Version bumped * test: New step added * test: Some projects removed * test: Projects added back * feat: 4.3 content updates * test: Stride.Core.Assets.csproj removed * test: Reversing the change * feat: Release notes updated * test: Remove test project * Update workflow to build DocFX from PR using dotnet publish and add to PATH * fix: Image path fixed * fix: Note section fixed * test: Custom build test added * test: Template install added * test: Another action disabled * test: Minor updates * fix: Paths fixed * test: Actions enabled * feat: Test build added to solution items * fix: Minor update * Update GitHub Actions workflow for DocFX build * Change runner to windows-latest for deployment
1 parent 0174611 commit e004931

File tree

15 files changed

+363
-65
lines changed

15 files changed

+363
-65
lines changed

.github/workflows/stride-docs-staging-azure.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ jobs:
2525
build:
2626
# Run this job only if the repository is 'stride3d/stride-docs'
2727
if: github.repository == 'stride3d/stride-docs'
28-
runs-on: windows-2022
28+
runs-on: windows-latest
2929

3030
steps:
3131
- name: .NET SDK Setup
3232
uses: actions/setup-dotnet@v4
3333
with:
34-
dotnet-version: 8.x
34+
dotnet-version: 10.x
3535

3636
# Checkout the Stride Docs repository from the branch that triggered the workflow
3737
- name: Checkout Stride Docs
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
3939
with:
4040
path: ${{ env.DOCS_PATH }}
4141
lfs: true
@@ -57,19 +57,46 @@ jobs:
5757

5858
# Checkout the Stride repository from the default branch
5959
- name: Checkout Stride (note the LFS)
60-
uses: actions/checkout@v4
60+
uses: actions/checkout@v5
6161
with:
6262
repository: stride3d/stride
6363
token: ${{ secrets.GITHUB_TOKEN }}
6464
path: stride
6565
lfs: true
6666
ref: master
6767

68-
- name: Install DocFX
68+
# Temporary solution till the new docfx is available
69+
- name: Checkout DocFX PR Branch
70+
uses: actions/checkout@v5
71+
with:
72+
repository: filzrev/docfx
73+
ref: feat-add-net10-support
74+
path: docfx-build
75+
76+
- name: Restore npm dependencies
77+
run: npm install
78+
working-directory: docfx-build/templates
79+
80+
- name: Build site templates
81+
run: npm run build
82+
working-directory: docfx-build/templates
83+
84+
- name: Build DocFX from PR
85+
run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
86+
working-directory: docfx-build
87+
shell: pwsh
88+
89+
- name: Build Install DocFX
90+
run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
91+
working-directory: docfx-build
92+
shell: pwsh
93+
# End of Temporary solution
94+
95+
#- name: Install DocFX
6996
# This installs the latest version of DocFX and may introduce breaking changes
7097
# run: dotnet tool update -g docfx
7198
# This installs a specific, tested version of DocFX.
72-
run: dotnet tool update -g docfx --version 2.78.3
99+
#run: dotnet tool update -g docfx --version 2.78.3
73100

74101
- name: Build documentation
75102
run: ./build-all.bat
@@ -79,14 +106,14 @@ jobs:
79106
run: 7z a -r DocFX-app.zip ./${{ env.DOCS_PATH }}/_site/*
80107

81108
- name: Upload artifact for deployment job
82-
uses: actions/upload-artifact@v4
109+
uses: actions/upload-artifact@v5
83110
with:
84111
name: DocFX-app
85112
path: DocFX-app.zip
86113

87114
deploy:
88115
if: github.repository == 'stride3d/stride-docs'
89-
runs-on: windows-2022
116+
runs-on: windows-latest
90117

91118
needs: build
92119
environment:
@@ -95,7 +122,7 @@ jobs:
95122

96123
steps:
97124
- name: Download artifact from build job
98-
uses: actions/download-artifact@v4
125+
uses: actions/download-artifact@v6
99126
with:
100127
name: DocFX-app
101128

.github/workflows/stride-docs-test-build.yml

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ on:
1313

1414
jobs:
1515
build:
16-
runs-on: windows-2022
16+
runs-on: windows-latest
1717

1818
steps:
1919
- name: .NET SDK Setup
20-
uses: actions/setup-dotnet@v4
20+
uses: actions/setup-dotnet@v5
2121
with:
22-
dotnet-version: 8.x
22+
dotnet-version: 10.x
2323

2424
# Checkout the Stride Docs repository from the branch that triggered the workflow
2525
- name: Checkout Stride Docs
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2727
with:
2828
path: ${{ env.DOCS_PATH }}
2929
lfs: true
@@ -45,19 +45,46 @@ jobs:
4545

4646
# Checkout the Stride repository from the default branch
4747
- name: Checkout Stride (note the LFS)
48-
uses: actions/checkout@v4
48+
uses: actions/checkout@v5
4949
with:
5050
repository: stride3d/stride
5151
token: ${{ secrets.GITHUB_TOKEN }}
5252
path: stride
5353
lfs: true
5454
ref: master
5555

56-
- name: Install DocFX
56+
# Temporary solution till the new docfx is available
57+
- name: Checkout DocFX PR Branch
58+
uses: actions/checkout@v5
59+
with:
60+
repository: filzrev/docfx
61+
ref: feat-add-net10-support
62+
path: docfx-build
63+
64+
- name: Restore npm dependencies
65+
run: npm install
66+
working-directory: docfx-build/templates
67+
68+
- name: Build site templates
69+
run: npm run build
70+
working-directory: docfx-build/templates
71+
72+
- name: Build DocFX from PR
73+
run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
74+
working-directory: docfx-build
75+
shell: pwsh
76+
77+
- name: Build Install DocFX
78+
run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
79+
working-directory: docfx-build
80+
shell: pwsh
81+
# End of Temporary solution
82+
83+
#- name: Install DocFX
5784
# This installs the latest version of DocFX and may introduce breaking changes
5885
# run: dotnet tool update -g docfx
5986
# This installs a specific, tested version of DocFX.
60-
run: dotnet tool update -g docfx --version 2.78.3
87+
#run: dotnet tool update -g docfx --version 2.78.3
6188

6289
- name: Build documentation
6390
run: ./build-all.bat
@@ -67,7 +94,7 @@ jobs:
6794
run: 7z a -r DocFX-app.zip ./${{ env.DOCS_PATH }}/_site/*
6895

6996
- name: Upload artifact for deployment job
70-
uses: actions/upload-artifact@v4
97+
uses: actions/upload-artifact@v5
7198
with:
7299
name: DocFX-app
73100
path: DocFX-app.zip

Stride.Docs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
77
</PropertyGroup>

Stride.Docs.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.5.33516.290
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11205.157 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Docs", "Stride.Docs.csproj", "{F221508C-43CE-45A5-BC37-3050882A22A5}"
77
EndProject
@@ -13,6 +13,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
.github\workflows\stride-docs-release-fast-track-azure.yml = .github\workflows\stride-docs-release-fast-track-azure.yml
1414
.github\workflows\stride-docs-staging-azure.yml = .github\workflows\stride-docs-staging-azure.yml
1515
.github\workflows\stride-docs-staging-fast-track-azure.yml = .github\workflows\stride-docs-staging-fast-track-azure.yml
16+
.github\workflows\stride-docs-test-build.yml = .github\workflows\stride-docs-test-build.yml
1617
.github\workflows\stride-docs-wiki.yml = .github\workflows\stride-docs-wiki.yml
1718
EndProjectSection
1819
EndProject

0 commit comments

Comments
 (0)