diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..98394a3 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: Build Monacs +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + runs-on: '${{ matrix.os }}' + strategy: + matrix: + os: + - windows-2019 + dotnet-version: ['2.1.818'] + steps: + - uses: actions/checkout@v3 + - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + - name: Display dotnet version + run: dotnet --version + - name: Restore dependencies + run: dotnet restore + - name: Build in Debug + run: dotnet build -c Debug + - name: Run unit tests + run: dotnet test -c Debug --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1474282 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish nuget package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: windows-2019 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '2.1.818' + source-url: https://nuget.pkg.github.com//index.json + env: + NUGET_API_KEY: ${{secrets.NUGET_API_KEY}} + - run: dotnet build Monacs.Core/Monacs.Core.csproj -c Release + - name: Create the package + run: dotnet pack Monacs.Core/Monacs.Core.csproj -c Release -o . -v n + # - name: Publish the package to GPR + # run: dotnet nuget push Monacs.Core.*.nupkg -k $NUGET_API_KEY -s https://www.nuget.org/api/v2/package \ No newline at end of file diff --git a/Monacs.Core/Monacs.Core.csproj b/Monacs.Core/Monacs.Core.csproj index 53a7a4b..cd4c00e 100644 --- a/Monacs.Core/Monacs.Core.csproj +++ b/Monacs.Core/Monacs.Core.csproj @@ -9,9 +9,9 @@ true - + - + \ No newline at end of file diff --git a/Monacs.Core/Monacs.Core.nuspec b/Monacs.Core/Monacs.Core.nuspec index 145cb83..dfb0539 100644 --- a/Monacs.Core/Monacs.Core.nuspec +++ b/Monacs.Core/Monacs.Core.nuspec @@ -12,13 +12,11 @@ csharp functional functional-programming monads railway-oriented-programming rop - + - - - + diff --git a/README.md b/README.md index 099cae3..8694e5e 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,9 @@ It also encourages use of [Railway Oriented Programming](https://fsharpforfunand Monacs uses type and function names similar to F#. That's intentional and it should make potential transition to F# easier. Some people may prefer Haskell type names (e.g. Maybe instead of Option) or LINQ-like function naming (e.g. Select instead of Map) - if that's your preference, you can always fork this library and change the names accordingly :) -[![Build Status](https://travis-ci.org/MonacsLib/Monacs.svg?branch=master)](https://travis-ci.org/MonacsLib/Monacs) - ## Target platform and language versions -Currently the library is build against .NET 4.6.1, .NET Standard 1.3 and .NET Standard 2.0. To use the library you need to have .NET 4.6.1+ or .NET Core 1.0+ project with C# language version 6 or higher. +Currently the library is build against .NET 4.6.1, .NET Standard 1.3 and .NET Standard 2.0. To use the library you need to have .NET 4.6.1+ or .NET Core 1.0+ project with C# language version 6 or higher. ## Documentation diff --git a/global.json b/global.json new file mode 100644 index 0000000..5e7c017 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "2.1.818" + } + } \ No newline at end of file