diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7094bd..206eebe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 47adb4d..904597c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 @@ -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: | diff --git a/FluentEmail.Graph.sln b/FluentEmail.Graph.sln index 516a5f7..2a87350 100644 --- a/FluentEmail.Graph.sln +++ b/FluentEmail.Graph.sln @@ -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 @@ -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} diff --git a/global.json b/global.json new file mode 100644 index 0000000..9a523dc --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "10.0.0", + "rollForward": "latestMajor", + "allowPrerelease": false + } +} \ No newline at end of file diff --git a/sample/SendMailTestApp/SendMailTestApp.csproj b/sample/SendMailTestApp/SendMailTestApp.csproj index bee9e78..8c305a2 100644 --- a/sample/SendMailTestApp/SendMailTestApp.csproj +++ b/sample/SendMailTestApp/SendMailTestApp.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 enable enable 4eba8463-a290-440f-b079-62d74334211a @@ -14,7 +14,7 @@ - + diff --git a/src/FluentEmail.Graph/FluentEmail.Graph.csproj b/src/FluentEmail.Graph/FluentEmail.Graph.csproj index d818a57..a43cd43 100644 --- a/src/FluentEmail.Graph/FluentEmail.Graph.csproj +++ b/src/FluentEmail.Graph/FluentEmail.Graph.csproj @@ -20,8 +20,9 @@ 0.0.1 MIT detailed - 2.4 - v2.4 Updated Microsoft.Graph to v5 + 3.0 + 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 @@ -40,21 +41,17 @@ v2.1 Added support for Inline images - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/tests/FluentEmail.Graph.Tests/FluentEmail.Graph.Tests.csproj b/tests/FluentEmail.Graph.Tests/FluentEmail.Graph.Tests.csproj index 246f480..047a46c 100644 --- a/tests/FluentEmail.Graph.Tests/FluentEmail.Graph.Tests.csproj +++ b/tests/FluentEmail.Graph.Tests/FluentEmail.Graph.Tests.csproj @@ -1,19 +1,17 @@ - net6.0 + net10.0 false true true latestmajor + Exe - - - - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -21,6 +19,11 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/tests/FluentEmail.Graph.Tests/UnitTest1.cs b/tests/FluentEmail.Graph.Tests/UnitTest1.cs index 50713cd..7b3b0ce 100644 --- a/tests/FluentEmail.Graph.Tests/UnitTest1.cs +++ b/tests/FluentEmail.Graph.Tests/UnitTest1.cs @@ -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