Skip to content

Fix HIBC parser: handle empty segments and relax UnitOfMeasure valida… #124

Fix HIBC parser: handle empty segments and relax UnitOfMeasure valida…

Fix HIBC parser: handle empty segments and relax UnitOfMeasure valida… #124

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: CI
on:
push:
branches:
- '**'
tags:
- '*'
pull_request:
branches:
- '**'
env:
isTagBuild: ${{ startsWith(github.ref, 'refs/tags/') }}
publishDirectory: ${{ github.workspace }}/publish
nugetApiKey: ${{ secrets.NUGET_API_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
# - name: echo type
# run: echo "is tag build ${{env.isTagBuild}} -> ${{env.publishDirectory}}"
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup .NET6
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal
- name: Copy Artifacts
run: |
mkdir -p $publishDirectory
find . -wholename '*/Release/*.nupkg' | xargs cp -t $publishDirectory
ls -al $publishDirectory
- name: Publish Artifacts
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ${{ env.publishDirectory }}
- name: Publish
if: env.isTagBuild == 'true'
run: find $publishDirectory -name '*.nupkg' | xargs dotnet nuget push --api-key $nugetApiKey -s https://api.nuget.org/v3/index.json