Skip to content

Merge pull request #32 from Efferent-Health/dependabot/nuget/benchmar… #43

Merge pull request #32 from Efferent-Health/dependabot/nuget/benchmar…

Merge pull request #32 from Efferent-Health/dependabot/nuget/benchmar… #43

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- .gitignore
- README.md
- LICENSE.txt
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Compile source (.NET 8 + .NETStandard)
run: |
dotnet build src/HL7-V2.csproj --configuration Release
dotnet build src/HL7-V2.csproj --configuration Release -f netstandard2.0
- name: Run unit tests (.NET 8 + .NETStandard)
run: |
dotnet test test/HL7Test.csproj --configuration Release --logger:trx
dotnet test test/HL7Test.csproj --configuration Release --logger:trx -f netstandard2.0
env:
TEST_TITLE: HL7-V2 unit test
deploy:
runs-on: windows-latest
needs: build
if: contains(github.event.head_commit.modified, 'src/HL7-V2.csproj') || contains(github.event.head_commit.added, 'src/HL7-V2.csproj') || contains(github.event.head_commit.renamed, 'src/HL7-V2.csproj')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Prepare NuGet package
run: dotnet pack **/HL7-V2.csproj --configuration Release
- name: Publish NuGet package
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push **/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json