Merge pull request #734 from Aiko-IT-Systems/renovate/sentry-dotnet-m… #3849
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 Library" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "DisCatSharp.Docs/**" | |
| - "DisCatSharp.Archive/**" | |
| - "DisCatSharp.Tools/**" | |
| - "DisCatSharp.Logos/**" | |
| - "DisCatSharp.Attributes/**" | |
| - "*.md" | |
| - "*.json" | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: true | |
| jobs: | |
| build: | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| name: Build library | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.0.0 | |
| with: | |
| dotnet-version: | | |
| 10.0.100-rc.1.25451.107 | |
| 9.x | |
| 8.x | |
| - name: Restore dependencies | |
| run: | | |
| dotnet restore --no-cache -f -v minimal DisCatSharp.slnx | |
| dotnet restore --no-cache -f -v minimal DisCatSharp.Tools/DisCatSharp.Tools.slnx | |
| - name: Build library | |
| run: dotnet build -c Release -v minimal --no-restore DisCatSharp.slnx | |
| - name: Build tools | |
| run: dotnet build -c Release -v minimal --no-restore DisCatSharp.Tools/DisCatSharp.Tools.slnx | |
| - name: Test library | |
| run: dotnet test -v minimal -c Release --no-restore --no-build DisCatSharp.slnx | |
| pack: | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| name: "Pack and Artifact" | |
| needs: build | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5.0.0 | |
| with: | |
| dotnet-version: | | |
| 10.0.100-rc.1.25451.107 | |
| 9.x | |
| 8.x | |
| - name: Restore Packages | |
| run: dotnet restore --no-cache -f -v minimal DisCatSharp.slnx | |
| - name: Build library | |
| run: dotnet build -c Release -v minimal --no-restore DisCatSharp.slnx | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
| SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
| - name: Publish library | |
| run: dotnet pack -c Release -v minimal --no-build --no-restore --include-symbols --include-source -o ./artifacts DisCatSharp.slnx | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v5.0.0 | |
| with: | |
| name: DisCatSharp | |
| path: ./artifacts/ |