Skip to content

Merge pull request #13 from ibi-group/feature/support-WZDx-v4.2 #22

Merge pull request #13 from ibi-group/feature/support-WZDx-v4.2

Merge pull request #13 from ibi-group/feature/support-WZDx-v4.2 #22

name: IBI.WZDx NuGet Package
on:
push:
branches:
- main
- develop
pull_request:
branches:
- develop
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build --configuration Release
- name: Run unit tests
run: dotnet test --configuration Release --no-build tests/IBI.WZDx.UnitTests/IBI.WZDx.UnitTests.csproj
- name: Pack IBI.WZDx NuGet package (pre-release)
if: ${{ github.ref != 'refs/heads/main' }}
run: dotnet pack --configuration Release --no-build --version-suffix preview.${{ github.run_number }} src/IBI.WZDx/IBI.WZDx.csproj
- name: Pack IBI.WZDx NuGet package (stable)
if: ${{ github.ref == 'refs/heads/main' }}
run: dotnet pack --configuration Release --no-build src/IBI.WZDx/IBI.WZDx.csproj
- name: Push IBI.WZDx NuGet package to nuget.org
run: dotnet nuget push src/IBI.WZDx/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}