From b26d30c27a127f1d41471ea0ee18ea340e5b9b7e Mon Sep 17 00:00:00 2001 From: Vaclav Elias Date: Sun, 19 Jan 2025 01:06:16 +0000 Subject: [PATCH 1/2] refactor: Empty lines removed --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e612a0e..3d29b91 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,7 +15,7 @@ on: jobs: build: runs-on: windows-latest - + steps: - name: Checkout Stride Community Toolkit uses: actions/checkout@v4 From c4f8e09a8011dca532f0c947b00f3c9f05ca5d65 Mon Sep 17 00:00:00 2001 From: Vaclav Elias Date: Sun, 19 Jan 2025 01:17:53 +0000 Subject: [PATCH 2/2] feat: Update ci/cd with the new project --- .github/workflows/dotnet-nuget.yml | 43 +++++++++----------- docs/contributing/toolkit/library-project.md | 4 +- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/dotnet-nuget.yml b/.github/workflows/dotnet-nuget.yml index 444b5b1..e56731f 100644 --- a/.github/workflows/dotnet-nuget.yml +++ b/.github/workflows/dotnet-nuget.yml @@ -4,6 +4,7 @@ env: PROJECT_PATH_CORE: src/Stride.CommunityToolkit/Stride.CommunityToolkit.csproj PROJECT_PATH_BEPU: src/Stride.CommunityToolkit.Bepu/Stride.CommunityToolkit.Bepu.csproj PROJECT_PATH_BULLET: src/Stride.CommunityToolkit.Bullet/Stride.CommunityToolkit.Bullet.csproj + PROJECT_PATH_DEBUG: src/Stride.CommunityToolkit.DebugShapes/Stride.CommunityToolkit.DebugShapes.csproj PROJECT_PATH_IMGUI: src/Stride.CommunityToolkit.ImGui/Stride.CommunityToolkit.ImGui.csproj PROJECT_PATH_SKYBOX: src/Stride.CommunityToolkit.Skyboxes/Stride.CommunityToolkit.Skyboxes.csproj PROJECT_PATH_WINDOWS: src/Stride.CommunityToolkit.Windows/Stride.CommunityToolkit.Windows.csproj @@ -41,28 +42,6 @@ jobs: - name: Restore dependencies - Stride.CommunityToolkit run: dotnet restore ${{ env.PROJECT_PATH_CORE }} - # Temporary solution, because of System.Security.Cryptography.Pkcs not found issue - # - name: Modify Stride.Core.Assets.CompilerApp.targets - # shell: pwsh - # run: | - # $targetsPath = Join-Path -Path (Get-ChildItem -Path "${env:USERPROFILE}\.nuget\packages\stride.core.assets.compilerapp\4.2.0.2122\buildTransitive" -Filter "Stride.Core.Assets.CompilerApp.targets" -Recurse).DirectoryName -ChildPath "Stride.Core.Assets.CompilerApp.targets" - - # [xml]$targetsXml = Get-Content -Path $targetsPath - # $namespaceManager = New-Object System.Xml.XmlNamespaceManager($targetsXml.NameTable) - # $namespaceManager.AddNamespace("msbuild", "http://schemas.microsoft.com/developer/msbuild/2003") - - # $targetNode = $targetsXml.SelectSingleNode("//msbuild:Target[@Name='_StridePrepareAssetsForPack']", $namespaceManager) - # if ($targetNode -ne $null) - # { - # $targetNode.SetAttribute("Condition", "false") - # $targetsXml.Save($targetsPath) - # Write-Host "Modified _StridePrepareAssetsForPack target in Stride.Core.Assets.CompilerApp.targets" - # } - # else - # { - # Write-Host "_StridePrepareAssetsForPack target not found in Stride.Core.Assets.CompilerApp.targets" - # } - - name: Build run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore @@ -151,6 +130,24 @@ jobs: NUGET_KEY: ${{secrets.NUGET_API_KEY}} TAG_COMMIT: false + # Stride.CommunityToolkit.DebugShapes + - name: Restore dependencies - Stride.CommunityToolkit.DebugShapes + run: dotnet restore ${{ env.PROJECT_PATH_DEBUG }} + + - name: Build + run: dotnet build ${{ env.PROJECT_PATH_DEBUG }} --no-restore + + - name: Test + run: dotnet test ${{ env.PROJECT_PATH_DEBUG }} --no-build --verbosity normal + + - name: Publish Stride Community Toolkit - Bullet + uses: alirezanet/publish-nuget@v3.1.0 + with: + PROJECT_FILE_PATH: ${{ env.PROJECT_PATH_DEBUG }} + VERSION_FILE_PATH: ${{ env.COMMON_SETTINGS_PATH }} + NUGET_KEY: ${{secrets.NUGET_API_KEY}} + TAG_COMMIT: false + # Stride.CommunityToolkit.ImGui - name: Restore dependencies - Stride.CommunityToolkit.ImGui run: dotnet restore ${{ env.PROJECT_PATH_IMGUI }} @@ -174,4 +171,4 @@ jobs: run: | gh release create ${{ env.VERSION }} --title "v${{ env.VERSION }}" --notes "Release notes for ${{ env.VERSION }}" --draft env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/docs/contributing/toolkit/library-project.md b/docs/contributing/toolkit/library-project.md index a29e810..eabc5af 100644 --- a/docs/contributing/toolkit/library-project.md +++ b/docs/contributing/toolkit/library-project.md @@ -16,8 +16,8 @@ - Update `docs/docfx.json` to include the new `.csproj` location, ensuring that the [API documentation](../../api/index.md) is generated for the new library. 5. **Update CI/CD Workflows**: - Add the new project to: - - `.github\workflows\dotnet.yml`. - - `.github\workflows\dotnet-nuget.yml`. + - `.github\workflows\dotnet.yml` (`PROJECTS`). + - `.github\workflows\dotnet-nuget.yml` (`env` and `# Stride.CommunityToolkit.` section). 6. **Optional: Add Example Projects**: - If adding example projects, follow the existing folder structure pattern in the `examples` directory. 7. **Optional: Add Guidance Content**: