Skip to content

Commit b5582fa

Browse files
Merge pull request #7 from IowaComputerGurus/feature/net6
Updated for .NET 6
2 parents 551e314 + d6d258d commit b5582fa

File tree

9 files changed

+129
-37
lines changed

9 files changed

+129
-37
lines changed

.github/workflows/ci-build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI Build
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
pull_request:
7+
branches: [ develop ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
name: Validate Build
14+
env:
15+
solution-path: './src/NetCore.Utilities.Email.SendGrid.sln'
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Ensure .NET Installed
22+
uses: actions/setup-dotnet@v1
23+
with:
24+
dotnet-version: 6.0.x
25+
26+
- name: Install GitVersion
27+
run: dotnet tool install --global GitVersion.Tool
28+
29+
- name: Determine Version
30+
id: gitversion
31+
uses: gittools/actions/gitversion/[email protected]
32+
with:
33+
useConfigFile: true
34+
35+
- name: Restore Packages
36+
run: dotnet restore "${{ env.solution-path }}"
37+
- name: Build
38+
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
39+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release Build
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
name: Build & Publish to NuGet
12+
environment: nuget
13+
env:
14+
solution-path: './src/NetCore.Utilities.Email.SendGrid.sln'
15+
steps:
16+
- uses: actions/checkout@v2
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Ensure .NET Installed
21+
uses: actions/setup-dotnet@v1
22+
with:
23+
dotnet-version: 6.0.x
24+
25+
- name: Install GitVersion
26+
run: dotnet tool install --global GitVersion.Tool
27+
28+
- name: Determine Version
29+
id: gitversion
30+
uses: gittools/actions/gitversion/[email protected]
31+
with:
32+
useConfigFile: true
33+
34+
- name: Restore Packages
35+
run: dotnet restore "${{ env.solution-path }}"
36+
- name: Build
37+
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
38+
39+
- name: Publish
40+
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.ICG_NUGET_API_KEY}}

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ We want to welcome contributions from all interested parties to help continue to
22

33
## Branching Strategy
44

5-
We are using a simplified GitFlow structure for management of contributions. All Pull Requests should be submitted to the Development branch, and once we are ready to create a production release the organizers will merge development into master for the release.
5+
We are using a simplified GitFlow structure for management of contributions. All Pull Requests should be submitted to the `develop` branch, and once we are ready to create a production release the organizers will tag a new release.
66

77
## Automated Build Verifications
88

GitVersion.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
mode: ContinuousDeployment
2+
next-version: 5.1.4
3+
branches:
4+
develop:
5+
regex: develop
6+
tag: 'alpha'
7+
increment: Patch
8+
source-branches: []
9+
pull-request:
10+
regex: (pull|pull\-requests|pr)[/-]
11+
tag: 'pr'
12+
tag-number-pattern: '[/-](?<number>\d+)[-/]'
13+
increment: Patch
14+
prevent-increment-of-merged-branch-version: false
15+
is-release-branch: false
16+
source-branches: []
17+
ignore:
18+
sha: []
19+
merge-message-formats: {}

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# ICG.NetCore.Utilities.Email.SendGrid ![](https://img.shields.io/github/license/iowacomputergurus/netcore.utilities.email.SendGrid.svg)
2-
This library provides an easy to use implementation of SendGrid based email delivery. This abstraction with proper interfaces allows email implementation inside of your project with little effort and easy to manage integration, and boasts features such as automatic environment name appending as well as robust email templates.
32

4-
This package depends on the ICG.NetCore.Utilities.Email project for template implementation
3+
![Build Status](https://github.com/IowaComputerGurus/netcore.utilities.email/actions/workflows/ci-build.yml/badge.svg)
54

6-
## Build Status
5+
![](https://img.shields.io/nuget/v/icg.netcore.utilities.email.sendgrid.svg) ![](https://img.shields.io/nuget/dt/icg.netcore.utilities.email.sendgrid.svg)
76

8-
| Branch | Status |
9-
| --- | --- |
10-
| Main | ![Main Status](https://iowacomputergurus.visualstudio.com/ICG%20Open%20Source/_apis/build/status/NetCore%20Utilities%20Email%20SendGrid?branchName=main) |
11-
| Develop | ![Develop Status](https://iowacomputergurus.visualstudio.com/ICG%20Open%20Source/_apis/build/status/NetCore%20Utilities%20Email%20SendGrid?branchName=develop)
7+
This library provides an easy to use implementation of SendGrid based email delivery. This abstraction with proper interfaces allows email implementation inside of your project with little effort and easy to manage integration, and boasts features such as automatic environment name appending as well as robust email templates.
128

9+
This package depends on the ICG.NetCore.Utilities.Email project for template implementation
1310

1411
## SonarCloud Analysis
1512

@@ -19,10 +16,6 @@ This package depends on the ICG.NetCore.Utilities.Email project for template imp
1916
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=IowaComputerGurus_netcore.utilities.email.sendgrid&metric=sqale_index)](https://sonarcloud.io/dashboard?id=IowaComputerGurus_netcore.utilities.email.sendgrid)
2017

2118

22-
## NuGet (ICG.NetCore.Utilities.Email.SendGrid)
23-
24-
![](https://img.shields.io/nuget/v/icg.netcore.utilities.email.sendgrid.svg) ![](https://img.shields.io/nuget/dt/icg.netcore.utilities.email.sendgrid.svg)
25-
2619
## Dependencies
2720
The following additional NuGet packages are installed with this extension.
2821

@@ -33,19 +26,19 @@ The following additional NuGet packages are installed with this extension.
3326

3427
### Installation
3528
Standard installation via HuGet Package Manager
36-
```
29+
``` powershell
3730
Install-Package ICG.NetCore.Utilities.Email.SendGrid
3831
```
3932

4033
### Setup & Configuration Options
4134
To setup the needed dependency injection items for this library, add the following line in your DI setup.
42-
```
35+
``` csharp
4336
services.UseIcgNetCoreUtilitiesEmailSendGrid();
4437
```
4538

4639
Additionally you must specify the needed configuration elements within your AppSettings.json file
4740

48-
```
41+
``` json
4942
"SendGridServiceOptions": {
5043
"AdminEmail": "[email protected]",
5144
"AdminName": "John Smith",
@@ -77,7 +70,7 @@ Additionally you must specify the needed configuration elements within your AppS
7770

7871
Usage is primarly completed by injecting the IEmailService interface to your respective project, one injected emails can be sent with a single line of code.
7972

80-
```
73+
``` csharp
8174
_sendGridService.SendEmail("[email protected]", "My Subject", "<p>Hello!</p>");
8275
```
8376
Inline documentation exists for all API methods. We will continue to add more to this documentation in the future (PR's Welcome)

icgAppIcon.png

-1.55 KB
Binary file not shown.

src/NetCore.Utilities.Email.SendGrid.Tests/NetCore.Utilities.Email..SendGrid.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>ICG.NetCore.Utilities.Email.SendGrid.Tests</RootNamespace>
77
</PropertyGroup>
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
11-
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
12-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
11+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
12+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
1414
<PackageReference Include="Moq" Version="4.16.1" />
1515
<PackageReference Include="xunit" Version="2.4.1" />
1616
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>0.0.0</Version>
5-
</PropertyGroup>
6-
7-
<PropertyGroup>
8-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
95
<RootNamespace>ICG.NetCore.Utilities.Email.SendGrid</RootNamespace>
10-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
7+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
118
</PropertyGroup>
129

1310
<PropertyGroup>
@@ -20,30 +17,34 @@
2017
<RepositoryUrl>https://github.com/IowaComputerGurus/netcore.utilities.email.SendGrid</RepositoryUrl>
2118
<Authors>MitchelSellers;IowaComputerGurus</Authors>
2219
<Owners>IowaComputerGurus</Owners>
23-
<PackageIconUrl>https://raw.githubusercontent.com/IowaComputerGurus/netcore.utilities.email.sendgrid/main/icgAppIcon.png</PackageIconUrl>
20+
<PackageIcon>icgAppIcon.png</PackageIcon>
2421
<IsPackable>True</IsPackable>
2522
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2623
<IncludeSymbols>true</IncludeSymbols>
2724
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2825
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2926
</PropertyGroup>
3027

31-
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
32-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
33-
</PropertyGroup>
28+
<PropertyGroup Condition="'$GITHUB_ACTIONS)' == 'true'">
29+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
30+
</PropertyGroup>
31+
32+
<ItemGroup>
33+
<None Include="icgAppIcon.png" Pack="true" PackagePath="\" />
34+
</ItemGroup>
3435

3536
<ItemGroup>
36-
<PackageReference Include="icg.netcore.utilities.email" Version="4.0.4" />
37+
<PackageReference Include="icg.netcore.utilities.email" Version="6.0.0" />
3738
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.2.0" />
38-
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
39-
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
40-
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
41-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" />
42-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
39+
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
40+
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
41+
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" />
42+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
43+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
4344
<PrivateAssets>all</PrivateAssets>
4445
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4546
</PackageReference>
46-
<PackageReference Include="SendGrid" Version="9.24.3" />
47+
<PackageReference Include="SendGrid" Version="9.25.1" />
4748
</ItemGroup>
4849

4950
</Project>
107 KB
Loading

0 commit comments

Comments
 (0)