Bump xunit from 2.5.0 to 2.6.0 #136
Workflow file for this run
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: Test and Deploy Library | |
env: | |
VERSION_NUMBER: 1.0.4 | |
NUGET_KEY: ${{ secrets.NUGET_API_KEY }} | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- release/* | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Run tests | |
run: dotnet test --logger "junit;LogFileName=results.xml" | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: ${{ github.actor != 'dependabot[bot]' }} | |
with: | |
files: "**/TestResults/*.xml" | |
publish: | |
runs-on: ubuntu-latest | |
needs: [test] | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Output Version Number | |
run: echo "Version-$VERSION_NUMBER.$GITHUB_RUN_NUMBER" | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Package | |
run: dotnet pack ./src/NHSNumberValidator/NHSNumberValidator.csproj -c Release /P:PackageVersion=$VERSION_NUMBER.$GITHUB_RUN_NUMBER | |
- name: Publish | |
run: nuget push ./src/NHSNumberValidator/bin/Release/NHSNumberValidator.$VERSION_NUMBER.$GITHUB_RUN_NUMBER.nupkg -ApiKey $NUGET_KEY -NonInteractive -Source https://www.nuget.org/api/v2/package |