From b0556a11c13e4224bf8a8ebc6e82965b2153c0a1 Mon Sep 17 00:00:00 2001 From: Vaclav Elias Date: Sat, 4 May 2024 18:13:01 +0100 Subject: [PATCH] feat: Toolkit GitHub action added --- .github/workflows/tookit-ndepend-github.yml | 55 +++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/tookit-ndepend-github.yml diff --git a/.github/workflows/tookit-ndepend-github.yml b/.github/workflows/tookit-ndepend-github.yml new file mode 100644 index 00000000..89f58488 --- /dev/null +++ b/.github/workflows/tookit-ndepend-github.yml @@ -0,0 +1,55 @@ +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build Toolkit NDepend Analysis for GitHub Pages + +env: + PROJECT_PATH_CORE: Stride.CommunityToolkit.sln + DEPLOY_DIR: ..\..\_temp\GitHubPages + +on: + workflow_dispatch: + +jobs: + publish-docs: + runs-on: windows-2022 + + steps: + - name: Dotnet Setup + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + + - name: Checkout Stride Community Toolkit + uses: actions/checkout@v4 + with: + repository: stride3d/stride-community-toolkit + token: ${{ secrets.GITHUB_TOKEN }} + lfs: true + + - name: Restore Stride dependencies + run: dotnet restore ${{ env.PROJECT_PATH_CORE }} + + - name: Build Stride.CommunityToolkit.sln + run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore + + - name: NDepend + uses: ndepend/ndepend-action@v1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + license: ${{ secrets.NDependLicense }} + customconfig: Stride.CommunityToolkit.ndproj + + - name: Prepare deployment files for GitHub Pages + shell: powershell + run: | + New-Item -ItemType Directory -Force -Path ${{ env.DEPLOY_DIR }} + Copy-Item -Path ..\..\_temp\NDependOut\NDependReport.html -Destination ${{ env.DEPLOY_DIR }}\ + Copy-Item -Path ..\..\_temp\NDependOut\NDependReportFiles -Destination ${{ env.DEPLOY_DIR }}\ -Recurse + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4.0.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ${{ env.DEPLOY_DIR }} + destination_dir: toolkit/ndepend + publish_branch: gh-pages \ No newline at end of file