diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bf5d334 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + +env: + DOTNET_VERSION: 7.0.x + BUILD_TARGET: .\Project\SharpLibEuropeanDataFormat.sln + + +jobs: + build: + name: .NET Build + runs-on: windows-latest + # Don't build for release the publish workflow will do that to + if: "!startsWith(github.event.head_commit.message, 'Release v')" + + steps: + - uses: actions/checkout@v2 + + - name: Use .NET ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build + run: dotnet build ${{ env.BUILD_TARGET }} -c Release diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..992b903 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,57 @@ +name: Publish + +on: + push: + branches: [ main ] + +env: + DOTNET_VERSION: 7.0.x + BUILD_TARGET: .\Project\SharpLibEuropeanDataFormat.sln + +jobs: + build: + name: .NET Build + runs-on: windows-latest + if: "startsWith(github.event.head_commit.message, 'Release v')" + + steps: + - uses: actions/checkout@v2 + + - name: Use .NET ${{ env.DOTNET_VERSION }} + uses: actions/setup-dotnet@v1 + with: + dotnet-version: ${{ env.DOTNET_VERSION }} + + - name: Build + run: dotnet build ${{ env.BUILD_TARGET }} -c Release + + - name: Pack + run: dotnet pack ${{ env.BUILD_TARGET }} -c Release --no-build + + - name: Upload artifacts + uses: actions/upload-artifact@v2.3.1 + with: + name: nuget-packages + path: "**/*.nupkg" + + + publish: + name: Publish to NuGet + runs-on: windows-latest + needs: build + if: "startsWith(github.event.head_commit.message, 'Release v')" + + steps: + - name: Use NuGet + uses: NuGet/setup-nuget@v1.0.5 + with: + nuget-version: latest + nuget-api-key: ${{ secrets.NUGET_API_KEY }} + + - name: Fetch artifacts + uses: actions/download-artifact@v2.1.0 + with: + name: nuget-packages + + - name: Publish + run: nuget push **\*.nupkg -Source https://api.nuget.org/v3/index.json diff --git a/Project/Lib/SharpLibEuropeanDataFormat.csproj b/Project/Lib/SharpLibEuropeanDataFormat.csproj index 4cb2e18..ceabc39 100644 --- a/Project/Lib/SharpLibEuropeanDataFormat.csproj +++ b/Project/Lib/SharpLibEuropeanDataFormat.csproj @@ -1,9 +1,34 @@  net48;net6.0;net7.0;net8.0 + SharpLibEuropeanDataFormat Library SharpLib.EuropeanDataFormat false + 0.2.0 + SharpLibEuropeanDataFormat + Stéphane Lenclud and contributors + slions.net + Copyright © 2023 Stéphane Lenclud + C# library providing easy access to European Data Format (EDF) content. + https://github.com/Slion/SharpLibEuropeanDataFormat + https://github.com/Slion/SharpLibEuropeanDataFormat + LICENSE.md + README.md + Windows;Windows10;Windows11;Medicine;EDF; + European Data Format Library (EDF) + git + + v0.2.0 Various bug fix and support for .NET 6, 7 and 8. + v0.1.4 Support reading floating point record duration. + v0.1.3 Making sure files can be shared while reading them. + v0.1.2 Reading signal by name now returns Signal object. + v0.1.1 Reading multiple single signals now works. + v0.1.0 Adding the ability to read a single signal. + v0.0.6 Adding function to compute signal sample time. + v0.0.5 Fixing date parsing issue on machine with en-US format. + v0.0.3 Start time and record time as DateTime. Various refactoring. + bin\x86\Debug\