Skip to content
Merged
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:

steps:
- name: ☁ Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: 👷 .NET SDK
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v5
with:
dotnet-version: "6.0"
dotnet-version: "10.x"

- name: ⬇ Install dependencies
run: dotnet restore
Expand All @@ -41,7 +41,13 @@ jobs:
run: dotnet pack ./src/FluentEmail.Graph/FluentEmail.Graph.csproj -c Release -o ./artifacts --no-build

- name: 🔑 Add GitHub packages to nuget sources
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ESC-BV/index.json"
run: |
dotnet nuget add source \
--username ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"

- name: 🚀 Publish to GitHub packages
run: dotnet nuget push "./artifacts/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:

steps:
- name: ☁ Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: 👷 .NET SDK
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v5
with:
dotnet-version: "6.0"
dotnet-version: "10.x"

- name: ⬇ Install dependencies
run: dotnet restore
Expand All @@ -38,7 +38,13 @@ jobs:
run: dotnet pack ./src/FluentEmail.Graph/FluentEmail.Graph.csproj -c Release -o ./artifacts --no-build

- name: 🔑 Add GitHub packages to nuget sources
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ESC-BV/index.json"
run: |
dotnet nuget add source \
--username ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"

- name: 🚀 Push package to Github and NuGet
run: |
Expand Down
14 changes: 14 additions & 0 deletions FluentEmail.Graph.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sample", "sample", "{A4341B
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendMailTestApp", "sample\SendMailTestApp\SendMailTestApp.csproj", "{24093217-E352-4B06-9138-C0641657F49D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{9A006E2F-010E-4680-9954-0BA348EE681C}"
ProjectSection(SolutionItems) = preProject
.github\dependabot.yml = .github\dependabot.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{09828C36-2EAB-4015-970F-24D5E61AAD7A}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\codeql-analysis.yml = .github\workflows\codeql-analysis.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -74,6 +86,8 @@ Global
{110F6221-F88C-44D8-B9E3-B3D1B9691DFD} = {D1C8192B-F35B-4433-9E5F-05F9E92DA58F}
{B01998E7-3FE2-4A66-968A-0B7725309129} = {779D4366-494E-4582-ACDA-38D55AEC2EE5}
{24093217-E352-4B06-9138-C0641657F49D} = {A4341B5B-E943-490B-94AE-D4637A7AF37C}
{9A006E2F-010E-4680-9954-0BA348EE681C} = {E37EFC29-B838-4EC7-8DDD-48303FE8FD52}
{09828C36-2EAB-4015-970F-24D5E61AAD7A} = {9A006E2F-010E-4680-9954-0BA348EE681C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F11BF11A-54C0-49CA-B567-850A4C6AC40A}
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "10.0.0",
"rollForward": "latestMajor",
"allowPrerelease": false
}
}
4 changes: 2 additions & 2 deletions sample/SendMailTestApp/SendMailTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UserSecretsId>4eba8463-a290-440f-b079-62d74334211a</UserSecretsId>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
19 changes: 8 additions & 11 deletions src/FluentEmail.Graph/FluentEmail.Graph.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
<Version>0.0.1</Version>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<MinVerVerbosity>detailed</MinVerVerbosity>
<MinVerMinimumMajorMinor>2.4</MinVerMinimumMajorMinor>
<PackageReleaseNotes>v2.4 Updated Microsoft.Graph to v5
<MinVerMinimumMajorMinor>3.0</MinVerMinimumMajorMinor>
<PackageReleaseNotes>v3.0 Updated all dependencies and upgraded test projects to .NET 10
v2.4 Updated Microsoft.Graph to v5
v2.2 Added support for Headers
v2.1 Added support for Inline images
</PackageReleaseNotes>
Expand All @@ -40,21 +41,17 @@ v2.1 Added support for Inline images
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1">
<PackageReference Include="Azure.Identity" Version="1.17.1" />
<PackageReference Include="DotNet.ReproducibleBuilds" Version="2.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentEmail.Core" Version="3.0.2" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0">
<PackageReference Include="JetBrains.Annotations" Version="2025.2.4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Graph" Version="5.40.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MinVer" Version="4.3.0">
<PackageReference Include="Microsoft.Graph" Version="5.101.0" />
<PackageReference Include="MinVer" Version="7.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
15 changes: 9 additions & 6 deletions tests/FluentEmail.Graph.Tests/FluentEmail.Graph.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<LangVersion>latestmajor</LangVersion>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.2.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="AwesomeAssertions" Version="9.3.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" Version="3.2.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 2 additions & 3 deletions tests/FluentEmail.Graph.Tests/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace FluentEmail.Graph.Tests;

using Microsoft.VisualStudio.TestTools.UnitTesting;
using Xunit;

[TestClass]
public class UnitTest1
{
[TestMethod]
[Fact]
public void TestMethod1()
{
// no tests yet, bit hard because you need actual appid, tenantid and secret for integration test
Expand Down