Merge pull request #380 from cake-contrib/renovate/xunit-dotnet-monorepo #1128
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - "feature/**" | |
| - "release/**" | |
| - "hotfix/**" | |
| tags: | |
| - "*" | |
| paths-ignore: | |
| - "README.md" | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ windows-2022, ubuntu-24.04, macos-13 ] | |
| env: | |
| AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }} | |
| AZURE_SOURCE: ${{ secrets.AZURE_SOURCE }} | |
| AZURE_USER: ${{ secrets.AZURE_USER }} | |
| COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
| GITHUB_PAT: ${{ secrets.GH_TOKEN }} | |
| GITTER_ROOM_ID: ${{ secrets.GITTER_ROOM_ID }} | |
| GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }} | |
| GPR_PASSWORD: ${{ secrets.GPR_PASSWORD }} | |
| GPR_SOURCE: ${{ secrets.GPR_SOURCE }} | |
| GPR_USER: ${{ secrets.GPR_USER }} | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| NUGET_SOURCE: "https://api.nuget.org/v3/index.json" | |
| TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
| TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
| TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} | |
| TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} | |
| WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }} | |
| WYAM_DEPLOY_BRANCH: "gh-pages" | |
| WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }} | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Fetch all tags and branches | |
| run: git fetch --prune --unshallow | |
| - uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0 | |
| with: | |
| # codecov needs 2.1 | |
| # unittests needs 3.1 | |
| # gitversion needs 5.0 | |
| # cake 1.3 needs 6.0 | |
| # gitrelasemanager (v0.18.0) needs 7.0 | |
| # .NET 9 to build | |
| # test are running on 8 and 9 | |
| dotnet-version: | | |
| 2.1 | |
| 3.1 | |
| 5.0 | |
| 6.0 | |
| 7.0 | |
| 8.0 | |
| 9.0 | |
| - name: Install mono | |
| if: runner.os == 'Linux' | |
| # check https://www.mono-project.com/download/stable/#download-lin | |
| run: | | |
| sudo apt install ca-certificates gnupg | |
| sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
| sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list | |
| sudo apt update | |
| sudo apt install -y mono-complete | |
| mono --version | |
| - name: Cache Tools | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .cake | |
| key: ${{ runner.os }}-cake-${{ hashFiles('recipe.cake') }} | |
| - name: Build project | |
| uses: cake-build/cake-action@d218f1133bb74a1df0b08c89cfd8fc100c09e1a0 # v3 | |
| with: | |
| script-path: recipe.cake | |
| target: CI | |
| cake-version: tool-manifest | |
| - name: Upload Issues | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | |
| with: | |
| if-no-files-found: warn | |
| name: ${{ matrix.os }} Issues | |
| path: | | |
| BuildArtifacts/report.html | |
| BuildArtifacts/**/coverlet/*.xml | |
| - name: Upload Packages | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | |
| if: runner.os == 'Windows' | |
| with: | |
| if-no-files-found: warn | |
| name: package | |
| path: BuildArtifacts/Packages/**/* |