Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: Build Perpetuum.Server Service v2 | |
| on: | |
| push: | |
| branches: [ "develop" ] | |
| pull_request: | |
| branches: [ "develop" ] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| Workspace: ${{ github.workspace }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build src/Perpetuum.ServerService2/Perpetuum.ServerService2.csproj --no-restore --configuration Release --verbosity quiet -p:Platform=x64 | |
| - name: Upload a Build Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Perpetuum-Server-v2-${{ github.sha }} | |
| path: ${{ env.Workspace }}/bin/x64/Release/net8.0 | |
| if: ${{ github.event_name == 'push'}} | |
| build-admintool-installer: | |
| runs-on: windows-latest | |
| env: | |
| Workspace: ${{ github.workspace }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore -p:Platform=x64 | |
| - name: Build AdminTool installer | |
| run: dotnet build src/Perpetuum.AdminToolInstaller/Perpetuum.AdminToolInstaller.wixproj --no-restore --configuration Release --verbosity quiet -p:Platform=x64 | |
| - name: Upload AdminTool installer | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Perpetuum-AdminTool-Installer-${{ github.sha }} | |
| path: ${{ env.Workspace }}/src/Perpetuum.AdminToolInstaller/bin/x64/Release/en-US/*.msi | |
| if: ${{ github.event_name == 'push' }} | |
| publish-wiki: | |
| runs-on: windows-latest | |
| needs: build | |
| if: github.event_name == 'push' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 10 (graphify tool requirement) | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore dotnet tools | |
| run: dotnet tool restore | |
| - name: Generate codebase report | |
| working-directory: ${{ github.workspace }} | |
| run: dotnet tool run graphify run src -o graphify-out -f report | |
| - name: Publish report to GitHub Wiki | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COMMIT_SHA: ${{ github.sha }} | |
| run: | | |
| git clone "https://x-access-token:$env:[email protected]/OpenPerpetuum/PerpetuumServer2.wiki.git" wiki-repo | |
| Copy-Item "graphify-out/GRAPH_REPORT.md" -Destination "wiki-repo/Codebase-Graph.md" -Force | |
| Set-Location wiki-repo | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add "Codebase-Graph.md" | |
| $changes = git status --porcelain | |
| if ($changes) { | |
| git commit -m "Update codebase graph report [$env:COMMIT_SHA]" | |
| git push | |
| } else { | |
| Write-Host "No wiki changes to publish" | |
| } |