Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit eeabcc4

Browse files
author
Morten Turn Pedersen
authored
Merge pull request #12 from nodes-dotnet/develop
Publish to NuGet
2 parents 2379bc5 + 8e92035 commit eeabcc4

File tree

13 files changed

+198
-227
lines changed

13 files changed

+198
-227
lines changed

.github/workflows/publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'NetCoreEntityFramework/**'
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 3.1.301
21+
22+
- name: Install dependencies
23+
run: dotnet restore **/*.sln
24+
25+
- name: Build
26+
run: dotnet build --configuration Release --no-restore **/*.sln
27+
28+
- name: Generate NuGet package
29+
run: |
30+
cd NetCoreEntityFramework
31+
dotnet pack --configuration Release --output out --no-build
32+
33+
- name: Push generated package to NuGet.org
34+
run: dotnet nuget push ./NetCoreEntityFramework/out/*.nupkg --skip-duplicate --no-symbols true --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}

.github/workflows/pullrequest.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: .NET Core
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- develop
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Setup .NET Core
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 3.1.301
21+
22+
- name: Install dependencies
23+
run: dotnet restore
24+
25+
- name: Build
26+
run: dotnet build --configuration Release --no-restore
27+
28+
- name: Test
29+
run: dotnet test --no-restore --verbosity normal

Build Configurations/Templates/Build Net Core.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Build Configurations/Templates/Install Net Core.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

Build Configurations/Templates/Pack Net Core.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

Build Configurations/Templates/Test Net Core.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

Build Configurations/ci.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

Build Configurations/publish.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

NetCoreEntityFramework.Tests/EntityRepositoryTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ public async Task RestoreSetsDeletedFalse()
355355

356356
var restoredEntity = await _repository.Get((Guid)_deletedEntity.Id);
357357
Assert.IsTrue(success);
358-
Assert.IsFalse(restoredEntity?.Deleted);
358+
Assert.IsFalse(restoredEntity.Deleted);
359+
Assert.IsNull(restoredEntity.DeletedAt);
359360
}
360361

361362
[Test]
@@ -377,7 +378,8 @@ public async Task RestoreOnIdSetsDeletedFalse()
377378

378379
var restoredEntity = await _repository.Get(id);
379380
Assert.IsTrue(success);
380-
Assert.IsFalse(restoredEntity?.Deleted);
381+
Assert.IsFalse(restoredEntity.Deleted);
382+
Assert.IsNull(restoredEntity.DeletedAt);
381383
}
382384

383385
[Test]

NetCoreEntityFramework/NetCoreEntityFramework.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
55
<PackageId>Nodes.NetCore.EntityFramework.Helpers</PackageId>
6-
<Version>1.1.0</Version>
6+
<Version>1.2.0</Version>
77
<Authors>Nodes</Authors>
88
<Company>Nodes</Company>
99
<Product>.NET Core Entity Framework Helpers</Product>

0 commit comments

Comments
 (0)