Skip to content

GitHub Actions migration #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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/<owner>/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
4 changes: 2 additions & 2 deletions Monacs.Core/Monacs.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<ItemGroup Condition = "'$(TargetFramework)' == 'netstandard1.3'">
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
<ItemGroup Condition = "'$(TargetFramework)' == 'net461' AND '$(OS)' == 'Windows_NT'">
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup>
</Project>
6 changes: 2 additions & 4 deletions Monacs.Core/Monacs.Core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
<tags>csharp functional functional-programming monads railway-oriented-programming rop</tags>
<dependencies>
<group targetFramework=".NETFramework4.6.1">
<dependency id="System.ValueTuple" version="4.4.0" />
<dependency id="System.ValueTuple" version="4.5.0" />
</group>
<group targetFramework=".NETStandard1.3">
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" />
<dependency id="System.ValueTuple" version="4.4.0" />
</group>
<group targetFramework=".NETStandard2.0">
<dependency id="System.ValueTuple" version="4.5.0" />
</group>
</dependencies>
</metadata>
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"sdk": {
"version": "2.1.818"
}
}