Browse Source

chore: .NET bumped

Vaclav Elias 1 month ago
parent
commit
f887b6f312

+ 4 - 4
.github/workflows/stride-docs-github.yml

@@ -12,17 +12,17 @@ on:
 
 jobs:
   publish-docs:
-    runs-on: windows-2022
+    runs-on: windows-latest
 
     steps:
     - name: .NET SDK Setup
       uses: actions/setup-dotnet@v4
       with:
-        dotnet-version: 8.x
+        dotnet-version: 10.x
 
     # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         path: ${{ env.DOCS_PATH }}
         lfs: true
@@ -36,7 +36,7 @@ jobs:
 
     # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         repository: stride3d/stride
         token: ${{ secrets.GITHUB_TOKEN }}

+ 37 - 9
.github/workflows/stride-docs-release-azure.yml

@@ -28,17 +28,17 @@ jobs:
   build:
     # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
-    runs-on: windows-2022
+    runs-on: windows-latest
 
     steps:
     - name: .NET SDK Setup
       uses: actions/setup-dotnet@v4
       with:
-        dotnet-version: 8.x
+        dotnet-version: 10.x
 
     # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         path: ${{ env.DOCS_PATH }}
         lfs: true
@@ -52,18 +52,46 @@ jobs:
 
     # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         repository: stride3d/stride
         token: ${{ secrets.GITHUB_TOKEN }}
         path: stride
         lfs: true
+        ref: master
 
-    - name: Install DocFX
+    # Temporary solution till the new docfx is available
+    - name: Checkout DocFX PR Branch
+      uses: actions/checkout@v5
+      with:
+        repository: filzrev/docfx
+        ref: feat-add-net10-support
+        path: docfx-build
+
+    - name: Restore npm dependencies
+      run: npm install
+      working-directory:  docfx-build/templates
+
+    - name: Build site templates
+      run: npm run build
+      working-directory:  docfx-build/templates
+
+    - name: Build DocFX from PR
+      run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
+      working-directory: docfx-build
+      shell: pwsh
+
+    - name: Build Install DocFX
+      run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
+      working-directory: docfx-build
+      shell: pwsh
+      # End of Temporary solution
+      
+    #- name: Install DocFX
       # This installs the latest version of DocFX and may introduce breaking changes
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.78.3
+      #run: dotnet tool update -g docfx --version 2.78.3
 
     - name: Build documentation
       run: ./build-all.bat
@@ -73,7 +101,7 @@ jobs:
       run: 7z a -r DocFX-app.zip ./${{ env.DOCS_PATH }}/_site/*
 
     - name: Upload artifact for deployment job
-      uses: actions/upload-artifact@v4
+      uses: actions/upload-artifact@v5
       with:
         name: DocFX-app
         path: DocFX-app.zip
@@ -87,7 +115,7 @@ jobs:
 
   deploy:
     if: github.repository == 'stride3d/stride-docs'
-    runs-on: windows-2022
+    runs-on: windows-latest
 
     needs: build
     environment:
@@ -96,7 +124,7 @@ jobs:
 
     steps:
     - name: Download artifact from build job
-      uses: actions/download-artifact@v4
+      uses: actions/download-artifact@v6
       with:
         name: DocFX-app
 

+ 37 - 6
.github/workflows/stride-docs-release-fast-track-azure.yml

@@ -4,6 +4,9 @@
 # The Fast Track skips creating artifacts and compressing them
 name: Build Stride Docs (Fast Track) for Azure Web App Release 🚀
 
+permissions:
+  contents: write  # required to create releases/tags
+
 env:
   COMMON_SETTINGS_PATH: en/docfx.json
   VERSION: "2.0.0.${{ github.run_number }}"
@@ -16,7 +19,7 @@ jobs:
   build-deploy:
     # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
-    runs-on: windows-2022
+    runs-on: windows-latest
 
     environment:
       name: 'Production'
@@ -25,11 +28,11 @@ jobs:
     - name: .NET SDK Setup
       uses: actions/setup-dotnet@v4
       with:
-        dotnet-version: 8.x
+        dotnet-version: 10.x
 
     # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         path: ${{ env.DOCS_PATH }}
         lfs: true
@@ -43,18 +46,46 @@ jobs:
 
     # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         repository: stride3d/stride
         token: ${{ secrets.GITHUB_TOKEN }}
         path: stride
         lfs: true
+        ref: master
+
+    # Temporary solution till the new docfx is available
+    - name: Checkout DocFX PR Branch
+      uses: actions/checkout@v5
+      with:
+        repository: filzrev/docfx
+        ref: feat-add-net10-support
+        path: docfx-build
+
+    - name: Restore npm dependencies
+      run: npm install
+      working-directory:  docfx-build/templates
 
-    - name: Install DocFX
+    - name: Build site templates
+      run: npm run build
+      working-directory:  docfx-build/templates
+
+    - name: Build DocFX from PR
+      run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
+      working-directory: docfx-build
+      shell: pwsh
+
+    - name: Build Install DocFX
+      run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
+      working-directory: docfx-build
+      shell: pwsh
+      # End of Temporary solution
+      
+    #- name: Install DocFX
       # This installs the latest version of DocFX and may introduce breaking changes
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.78.3
+      #run: dotnet tool update -g docfx --version 2.78.3
 
     - name: Build documentation
       run: ./build-all.bat

+ 34 - 6
.github/workflows/stride-docs-staging-fast-track-azure.yml

@@ -16,7 +16,7 @@ jobs:
   build-deploy:
     # Run this job only if the repository is 'stride3d/stride-docs'
     if: github.repository == 'stride3d/stride-docs'
-    runs-on: windows-2022
+    runs-on: windows-latest
 
     environment:
       name: 'Production'
@@ -25,11 +25,11 @@ jobs:
     - name: .NET SDK Setup
       uses: actions/setup-dotnet@v4
       with:
-        dotnet-version: 8.x
+        dotnet-version: 10.x
 
     # Checkout the Stride Docs repository from the branch that triggered the workflow
     - name: Checkout Stride Docs
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         path: ${{ env.DOCS_PATH }}
         lfs: true
@@ -43,18 +43,46 @@ jobs:
 
     # Checkout the Stride repository from the default branch
     - name: Checkout Stride (note the LFS)
-      uses: actions/checkout@v4
+      uses: actions/checkout@v5
       with:
         repository: stride3d/stride
         token: ${{ secrets.GITHUB_TOKEN }}
         path: stride
         lfs: true
+        ref: master
 
-    - name: Install DocFX
+    # Temporary solution till the new docfx is available
+    - name: Checkout DocFX PR Branch
+      uses: actions/checkout@v5
+      with:
+        repository: filzrev/docfx
+        ref: feat-add-net10-support
+        path: docfx-build
+
+    - name: Restore npm dependencies
+      run: npm install
+      working-directory:  docfx-build/templates
+
+    - name: Build site templates
+      run: npm run build
+      working-directory:  docfx-build/templates
+
+    - name: Build DocFX from PR
+      run: dotnet pack src/docfx -c Release /p:Version=2.9-stride -o drop/nuget
+      working-directory: docfx-build
+      shell: pwsh
+
+    - name: Build Install DocFX
+      run: dotnet tool install -g docfx --version 2.9-stride --add-source drop/nuget
+      working-directory: docfx-build
+      shell: pwsh
+      # End of Temporary solution
+      
+    #- name: Install DocFX
       # This installs the latest version of DocFX and may introduce breaking changes
       # run: dotnet tool update -g docfx
       # This installs a specific, tested version of DocFX.
-      run: dotnet tool update -g docfx --version 2.78.3
+      #run: dotnet tool update -g docfx --version 2.78.3
 
     - name: Build documentation
       run: ./build-all.bat