Use WithHeader implementation for WithRequestHeader and WithContentHe… #1042
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: CI | |
| on: [push, pull_request] | |
| env: | |
| DOTNET_NOLOGO: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Dump GitHub context | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| run: echo "$GITHUB_CONTEXT" | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup .NET versions | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Dump .NET info | |
| run: dotnet --info | |
| - name: Restore dotnet tools | |
| run: dotnet tool restore | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build source code | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Test with dotnet | |
| run: dotnet test --configuration Release --no-build --framework="net10.0" | |
| - name: Check source file format | |
| run: dotnet format --no-restore --verify-no-changes | |
| continue-on-error: true | |
| - name: Pack | |
| run: dotnet pack --output ./artifacts --configuration Release --no-build | |
| - uses: actions/upload-artifact@v5 | |
| with: | |
| name: artifacts | |
| path: ./artifacts | |
| testOnSupportedDotnetVersions: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Fetch all history for all tags and branches | |
| run: git fetch --prune --unshallow | |
| - name: Install Mono (Ubuntu only) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt install -y ca-certificates gnupg | |
| sudo gpg --homedir /tmp --no-default-keyring \ | |
| --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg \ | |
| --keyserver hkp://keyserver.ubuntu.com:80 \ | |
| --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
| 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 | |
| - name: Setup .NET versions | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.0.x | |
| 9.0.x | |
| 10.0.x | |
| - name: Dump .NET info | |
| run: dotnet --info | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build source code | |
| run: dotnet build --configuration Release --no-restore | |
| - name: Test with dotnet | |
| run: dotnet test --configuration Release --no-build | |
| publish: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup .NET versions | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 10.0.x | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: artifacts | |
| path: ./artifacts | |
| - name: Publish packages | |
| env: | |
| NUGET_TOKEN: ${{secrets.NUGET_TOKEN}} | |
| run: dotnet nuget push './artifacts/**/*.nupkg' --source https://api.nuget.org/v3/index.json --api-key ${{env.NUGET_TOKEN}} |