From e827dc22658532eb9b8676fc002ceb4f3d8940e9 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:12:39 +0100 Subject: [PATCH 01/17] GitHub Actions migration --- .github/workflows/main.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1dfa30b --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,21 @@ +name: Converted Workflow +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + runs-on: '${{ matrix.os }}' + strategy: + matrix: + os: + - ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: dotnet build -c Release + - run: >- + dotnet test -c Release --no-build + Monacs.UnitTests/Monacs.UnitTests.fsproj From 5054b3c85e7ba2287257240db1bb3e9330116903 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:15:27 +0100 Subject: [PATCH 02/17] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1dfa30b..d8c4a8d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,5 +17,4 @@ jobs: - uses: actions/checkout@v2 - run: dotnet build -c Release - run: >- - dotnet test -c Release --no-build - Monacs.UnitTests/Monacs.UnitTests.fsproj + dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj From c21ee6d5e4a0ba365276b74257cebf8c4bd6027c Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:19:06 +0100 Subject: [PATCH 03/17] Update main.yml --- .github/workflows/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8c4a8d..4c818c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Converted Workflow +name: Build Monacs on: push: branches: @@ -16,5 +16,4 @@ jobs: steps: - uses: actions/checkout@v2 - run: dotnet build -c Release - - run: >- - dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj + - run: dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj From f6a91ec9471d770782d65191f52b5e835667c138 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:27:49 +0100 Subject: [PATCH 04/17] Check --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c818c8..d913cc2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,5 +15,6 @@ jobs: - ubuntu-latest steps: - uses: actions/checkout@v2 + - run: dotnet --version - run: dotnet build -c Release - run: dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj From d1e0b65fe98387c9598390251bec769acf6059c4 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:32:21 +0100 Subject: [PATCH 05/17] Build update --- .github/workflows/main.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d913cc2..979015f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,8 +13,16 @@ jobs: matrix: os: - ubuntu-latest + dotnet-version: ['7.0.x'] steps: - - uses: actions/checkout@v2 - - run: dotnet --version - - run: dotnet build -c Release - - run: dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj + - 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: Build in release + run: dotnet build -c Release + - name: Run unit tests + run: dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj From 7c3963599b68fde5a3f69e213c0ddea4fdc04fff Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:40:00 +0100 Subject: [PATCH 06/17] Trying to make the build pass --- Monacs.Core/Monacs.Core.csproj | 3 +++ Monacs.Core/Monacs.Core.nuspec | 1 + 2 files changed, 4 insertions(+) diff --git a/Monacs.Core/Monacs.Core.csproj b/Monacs.Core/Monacs.Core.csproj index 53a7a4b..5859e23 100644 --- a/Monacs.Core/Monacs.Core.csproj +++ b/Monacs.Core/Monacs.Core.csproj @@ -8,6 +8,9 @@ true true + + + diff --git a/Monacs.Core/Monacs.Core.nuspec b/Monacs.Core/Monacs.Core.nuspec index 145cb83..0a72aba 100644 --- a/Monacs.Core/Monacs.Core.nuspec +++ b/Monacs.Core/Monacs.Core.nuspec @@ -19,6 +19,7 @@ + From ce04fff46e0084bd27f77be5124f438ef46d4cd8 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:46:57 +0100 Subject: [PATCH 07/17] Revert Tuple references --- .github/workflows/main.yml | 4 +--- Monacs.Core/Monacs.Core.csproj | 7 ++----- Monacs.Core/Monacs.Core.nuspec | 5 +---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 979015f..efb3fa4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,15 +13,13 @@ jobs: matrix: os: - ubuntu-latest - dotnet-version: ['7.0.x'] + dotnet-version: ['6.0.x'] 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: Build in release run: dotnet build -c Release - name: Run unit tests diff --git a/Monacs.Core/Monacs.Core.csproj b/Monacs.Core/Monacs.Core.csproj index 5859e23..cd4c00e 100644 --- a/Monacs.Core/Monacs.Core.csproj +++ b/Monacs.Core/Monacs.Core.csproj @@ -8,13 +8,10 @@ true true - - - - + - + \ No newline at end of file diff --git a/Monacs.Core/Monacs.Core.nuspec b/Monacs.Core/Monacs.Core.nuspec index 0a72aba..dfb0539 100644 --- a/Monacs.Core/Monacs.Core.nuspec +++ b/Monacs.Core/Monacs.Core.nuspec @@ -12,13 +12,10 @@ csharp functional functional-programming monads railway-oriented-programming rop - + - - - From 690ed756ed8c0336f7efeecc59bab644952b2925 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 13:56:53 +0100 Subject: [PATCH 08/17] Trying with older .NET --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index efb3fa4..3d61e0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: matrix: os: - ubuntu-latest - dotnet-version: ['6.0.x'] + dotnet-version: ['2.1.4'] steps: - uses: actions/checkout@v3 - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} From d6520b942dfc76202f1d3aebd6a6ccdf342c15d9 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:00:16 +0100 Subject: [PATCH 09/17] Try with restore --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3d61e0c..beeec0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,13 +13,15 @@ jobs: matrix: os: - ubuntu-latest - dotnet-version: ['2.1.4'] + dotnet-version: ['7.0.x'] 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: Install dependencies + run: dotnet restore - name: Build in release run: dotnet build -c Release - name: Run unit tests From 960da32b8633e6162dac4362a1c09139d860b443 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:04:44 +0100 Subject: [PATCH 10/17] Trigger the build again --- .github/workflows/main.yml | 2 ++ README.md | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index beeec0c..b0c314b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,8 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ matrix.dotnet-version }} + - name: Display dotnet version + run: dotnet --version - name: Install dependencies run: dotnet restore - name: Build in release 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 From a327460a7312a90b043f4452ebc74ce684fca02a Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:08:56 +0100 Subject: [PATCH 11/17] Try with .NET 2.1 again --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b0c314b..83d1724 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: matrix: os: - ubuntu-latest - dotnet-version: ['7.0.x'] + dotnet-version: ['2.1.x'] steps: - uses: actions/checkout@v3 - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} From de8329a1239b34e201176a21f7b328eb3ae070c8 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:15:25 +0100 Subject: [PATCH 12/17] One more try --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83d1724..4ece077 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: matrix: os: - ubuntu-latest - dotnet-version: ['2.1.x'] + dotnet-version: '2.1.x' steps: - uses: actions/checkout@v3 - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} From f0e38e0252f05fc748131be9d416d3323c6be949 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:21:27 +0100 Subject: [PATCH 13/17] Try to use .NET 2.1 --- .github/workflows/main.yml | 2 +- global.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 global.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ece077..a80da51 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: matrix: os: - ubuntu-latest - dotnet-version: '2.1.x' + dotnet-version: ['2.1.818'] steps: - uses: actions/checkout@v3 - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} 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 From 8e93048693be851042815329ef7abe8367c9795e Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:27:51 +0100 Subject: [PATCH 14/17] Trying to build on Windows --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a80da51..d0ba141 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: - - ubuntu-latest + - windows-2019 dotnet-version: ['2.1.818'] steps: - uses: actions/checkout@v3 From b0a02d7ee2592486c18bf363536d9d93f4823481 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:41:07 +0100 Subject: [PATCH 15/17] Publish profile --- .github/workflows/main.yml | 8 ++++---- .github/workflows/publish.yml | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d0ba141..98394a3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,9 +22,9 @@ jobs: dotnet-version: ${{ matrix.dotnet-version }} - name: Display dotnet version run: dotnet --version - - name: Install dependencies + - name: Restore dependencies run: dotnet restore - - name: Build in release - run: dotnet build -c Release + - name: Build in Debug + run: dotnet build -c Debug - name: Run unit tests - run: dotnet test -c Release --no-build Monacs.UnitTests/Monacs.UnitTests.fsproj + 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..9ff4e33 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Upload nuget package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: windows-2019 + permissions: + packages: write + contents: read + 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 From b549ff09e3b94b464dd42909ed269ccbf290c1a1 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 14:42:07 +0100 Subject: [PATCH 16/17] Fix --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9ff4e33..5e120d1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,5 +21,5 @@ jobs: - 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 + # - 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 From 82a619305aa3f05fc14c8b111041f5783e894b00 Mon Sep 17 00:00:00 2001 From: Bart Sokol Date: Tue, 22 Nov 2022 15:08:56 +0100 Subject: [PATCH 17/17] Publish script WIP --- .github/workflows/publish.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5e120d1..1474282 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Upload nuget package +name: Publish nuget package on: release: @@ -7,9 +7,6 @@ on: jobs: deploy: runs-on: windows-2019 - permissions: - packages: write - contents: read steps: - uses: actions/checkout@v3 - uses: actions/setup-dotnet@v3