Merge pull request #13 from ibi-group/feature/support-WZDx-v4.2 #22
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: 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 }} |