Skip to content

Commit

Permalink
Merge pull request #5 from JohnCampionJr/net6
Browse files Browse the repository at this point in the history
Updated to NET 6.0
  • Loading branch information
JohnCampionJr committed Feb 9, 2022
2 parents 8673673 + 3b853f4 commit bedbf97
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 45 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/dotnet-core-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
# If you want to specify a particular version, use this. Otherwise, will use the Runner's installed version
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.1.301
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/dotnet-core-multi-os-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, macOS-latest, windows-2022] # As of 2022-02-04, windows-latest >> windows-2019
steps:
- name: Configure MongoDB (MacOS)
if: matrix.os == 'macOS-latest'
Expand All @@ -30,16 +30,18 @@ jobs:
run: sudo systemctl start mongod
- name: Checkout
uses: actions/checkout@v2
# If you want to specify a particular version, use this. Otherwise, will use the Runner's installed version
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.1.301
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
- name: Test
run: dotnet test --logger trx --results-directory ${{env.BUILD_ARTIFACT_PATH}}/test-results/${{matrix.os}}
- name: Publish artifacts
if: ${{ always() }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/dotnet-core-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: .NET Core Publish (Ubuntu)

on:
# push:
# branches: [ main ]
#push:
# branches:
# branches-ignore:
#pull_request:
# branches:
Expand Down Expand Up @@ -33,10 +33,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
# If you want to specify a particular version, use this. Otherwise, will use the Runner's installed version
# - name: Setup .NET Core
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.1.301
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
- name: Get Build Version
id: getversion
uses: ./.github/workflows/get-version
Expand All @@ -48,8 +51,8 @@ jobs:
run: dotnet test --logger trx --results-directory ${{env.BUILD_ARTIFACT_PATH}}/test-results
- name: Pack
run: dotnet pack -c Release --no-build --include-symbols /p:SymbolPackageFormat=snupkg /p:Version=${{ steps.getversion.outputs.build-version }} /p:PackageOutputPath=${{env.BUILD_ARTIFACT_PATH}}/packages
# - name: Publish to GitHub Packages
# run: dotnet nuget push ${{env.BUILD_ARTIFACT_PATH}}/packages/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
- name: Publish to GitHub Packages
run: dotnet nuget push ${{env.BUILD_ARTIFACT_PATH}}/packages/*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate

- name: Publish artifacts
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion samples/Identity31Sample/Identity31Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="3.1.9" />
<PackageReference Include="MongoFramework" Version="0.25.0" />
<PackageReference Include="MongoFramework" Version="0.27.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0; net5.0</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<AssemblyName>MongoFramework.AspNetCore.Identity</AssemblyName>
<Title>MongoFramework.AspNetCore.Identity</Title>
<Description>.Net Core Identity providers for MongoFramework</Description>
Expand All @@ -10,22 +10,30 @@
</PropertyGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'net6.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="MongoFramework" Version="0.27.0" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="6.0.1" />
</ItemGroup>
</When>
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="MongoFramework" Version="0.27.0" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.1" />
</ItemGroup>
</When>
<Otherwise>
<When Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="MongoFramework" Version="0.27.0" />
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.1" />
</ItemGroup>
</Otherwise>
</When>
</Choose>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="5.0.1" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.1" />
<PackageReference Include="MongoFramework" Version="0.25.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

<Choose>
<When Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
<PackageReference Include="MongoFramework" Version="0.25.0" />
<PackageReference Include="MongoFramework" Version="0.27.0" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Expand Down

0 comments on commit bedbf97

Please sign in to comment.