Migrate to the new solution format #14
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
| name: Build and Publish | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - v*.*.* | |
| - v*.*.*-preview.* | |
| workflow_dispatch: | |
| env: | |
| MATCHMAKER_VERSION: v3.1.0 | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup docfx | |
| shell: pwsh | |
| run: | | |
| dotnet tool update --global docfx | |
| - name: Test Matchmaker | |
| shell: pwsh | |
| run: | | |
| dotnet test Matchmaker.slnx --nologo -c Release /p:ContinuousIntegrationBuild=true | |
| - name: Pack Matchmaker | |
| shell: pwsh | |
| run: | | |
| cd Matchmaker | |
| dotnet pack --nologo -c Release -o ${{github.workspace}}\build\ /p:ContinuousIntegrationBuild=true | |
| - name: Upload Matchmaker | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: matchmaker-build | |
| path: ${{github.workspace}}\build\* | |
| - name: Build Docs | |
| shell: pwsh | |
| working-directory: docs | |
| run: docfx docfx.json | |
| continue-on-error: false | |
| - name: Publish Docs | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{secrets.GITHUB_TOKEN}} | |
| publish_dir: docs-dest/ | |
| destination_dir: ${{env.MATCHMAKER_VERSION}} | |
| user_name: "Tolik Pylypchuk" | |
| user_email: "[email protected]" | |
| commit_message: "Deploy docs to GitHub Pages" | |
| publish: | |
| runs-on: windows-latest | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| needs: [build] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Fetch Package | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: matchmaker-build | |
| path: matchmaker-build | |
| - name: Publish Package | |
| shell: pwsh | |
| run: | | |
| cd .\matchmaker-build | |
| dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json |