Merge pull request #36 from lucassklp/improve-request-options #31
This file contains 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, Test and Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.302 | |
source-url: https://nuget.pkg.github.com/lucassklp/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Test | |
run: dotnet test --collect:"XPlat Code Coverage" --no-restore --verbosity normal | |
- name: Moving test coverage result to root folder | |
run: | | |
mv Rx.Http.Tests/TestResults/**/coverage.cobertura.xml ./ | |
- name: Send test coverage to Codacy | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage.cobertura.xml | |
- name: Pack | |
run: | | |
dotnet pack -c Release -o . | |
- name: Push Rx.Http to GitHub registry | |
run: | | |
dotnet nuget push "*.nupkg" -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/lucassklp/index.json --skip-duplicate | |
- name: Push Rx.Http to NuGet registry | |
run: | | |
dotnet nuget push "*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate |