From 4a9ac04bf946de79397187388859ffcdac13ca9b Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:02:23 +0200
Subject: [PATCH 01/11] Improve ci.yml
---
.github/workflows/ci.yml | 48 ++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2167601..90cd4d1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,11 +23,11 @@ jobs:
matrix:
include:
- os: windows-latest
- name: Build, test & NuGet package (Windows)
- create_nuget_package: true
+ name: Build & test (Windows)
+ framework_args:
- os: ubuntu-latest
name: Build & test (Ubuntu)
- create_nuget_package: false
+ framework_args: --framework net10.0
runs-on: ${{ matrix.os }}
permissions:
contents: read
@@ -35,22 +35,28 @@ jobs:
steps:
- uses: actions/checkout@v7
- - name: Setup .NET
- uses: actions/setup-dotnet@v6
- with:
- dotnet-version: ${{ env.DOTNET_VERSION }}
-
- name: Restore
run: dotnet restore ${{ env.SOLUTION }}
- name: Build
- run: dotnet build ${{ env.SOLUTION }} --configuration Release --no-restore
+ run: dotnet build ${{ env.SOLUTION }} --configuration Release --no-restore ${{ matrix.framework_args }}
- name: Test
- run: dotnet test ${{ env.SOLUTION }} --configuration Release --no-restore --no-build --logger "console;verbosity=normal"
+ run: dotnet test ${{ env.SOLUTION }} --configuration Release --no-restore --no-build ${{ matrix.framework_args }} --logger "console;verbosity=normal"
+
+ pack:
+ name: Create NuGet package
+ runs-on: windows-latest
+ permissions:
+ contents: read
+
+ steps:
+ - uses: actions/checkout@v7
+
+ - name: Restore
+ run: dotnet restore ${{ env.SOLUTION }}
- name: Determine version suffix
- if: matrix.create_nuget_package
id: version
shell: pwsh
env:
@@ -67,19 +73,12 @@ jobs:
}
- name: Create NuGet package
- if: matrix.create_nuget_package
shell: pwsh
env:
VERSION_SUFFIX: ${{ steps.version.outputs.suffix }}
- run: |
- if ($env:VERSION_SUFFIX) {
- dotnet pack $env:SOLUTION --no-build --configuration Release --output artifacts --version-suffix "$env:VERSION_SUFFIX"
- } else {
- dotnet pack $env:SOLUTION --no-build --configuration Release --output artifacts
- }
+ run: dotnet pack $env:SOLUTION --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
- name: Upload NuGet package
- if: matrix.create_nuget_package
uses: actions/upload-artifact@v7
with:
name: NuGetPackages
@@ -90,11 +89,11 @@ jobs:
publish:
name: Publish NuGet package
- needs: build
+ needs: [build, pack]
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch' && inputs.force_nuget_publish)
- runs-on: windows-latest
+ runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
@@ -106,11 +105,6 @@ jobs:
name: NuGetPackages
path: artifacts
- - name: Setup .NET
- uses: actions/setup-dotnet@v6
- with:
- dotnet-version: ${{ env.DOTNET_VERSION }}
-
- name: NuGet login
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2
id: login
@@ -121,4 +115,4 @@ jobs:
shell: pwsh
env:
NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }}
- run: dotnet nuget push artifacts\*.nupkg --api-key $env:NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
+ run: dotnet nuget push "artifacts/*.nupkg" --api-key $env:NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate
From 2fcb0618af5bda57499c70f0233a9ecbd8334da9 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:09:50 +0200
Subject: [PATCH 02/11] net8.0
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 90cd4d1..923884b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
framework_args:
- os: ubuntu-latest
name: Build & test (Ubuntu)
- framework_args: --framework net10.0
+ framework_args: --framework net8.0
runs-on: ${{ matrix.os }}
permissions:
contents: read
From b5cad2851127823483df7fa31027d18af45fc077 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:20:11 +0200
Subject: [PATCH 03/11] netstandard2.1
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 923884b..f36c3e1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,7 +27,7 @@ jobs:
framework_args:
- os: ubuntu-latest
name: Build & test (Ubuntu)
- framework_args: --framework net8.0
+ framework_args: --framework netstandard2.1
runs-on: ${{ matrix.os }}
permissions:
contents: read
From aeaf97300249602168cc40bfce88b8ea4045b8e5 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:20:24 +0200
Subject: [PATCH 04/11] Update ci.yml
---
.github/workflows/ci.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f36c3e1..fd451d2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,7 +14,6 @@ on:
env:
SOLUTION: src/NLog.MailKit.sln
- DOTNET_VERSION: 8.0.x
jobs:
build:
From 5be026201d46d21b90ae26dc3dec7437e6d60e37 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:36:10 +0200
Subject: [PATCH 05/11] Update ci.yml
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fd451d2..bc5201c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -26,7 +26,7 @@ jobs:
framework_args:
- os: ubuntu-latest
name: Build & test (Ubuntu)
- framework_args: --framework netstandard2.1
+ framework_args:
runs-on: ${{ matrix.os }}
permissions:
contents: read
From dda95ba89224001c6f0852796943bc9861294a82 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:42:16 +0200
Subject: [PATCH 06/11] Update ci.yml
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bc5201c..d7cedee 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -75,7 +75,7 @@ jobs:
shell: pwsh
env:
VERSION_SUFFIX: ${{ steps.version.outputs.suffix }}
- run: dotnet pack $env:SOLUTION --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
+ run: dotnet pack ${{ env.SOLUTION }} --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
- name: Upload NuGet package
uses: actions/upload-artifact@v7
From 36ba9819ec9bffdc7ccf889b4dbc48ed5a61f309 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 16:59:24 +0200
Subject: [PATCH 07/11] ContinuousIntegrationBuild
---
.github/workflows/ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d7cedee..39aa6b1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,6 +14,7 @@ on:
env:
SOLUTION: src/NLog.MailKit.sln
+ ContinuousIntegrationBuild: true
jobs:
build:
From 0afe190aec23bea6b607fd1609608cd1f50b6972 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sat, 24 Oct 2026 17:07:37 +0200
Subject: [PATCH 08/11] pack --no-build
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 39aa6b1..11f9b6b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -76,7 +76,7 @@ jobs:
shell: pwsh
env:
VERSION_SUFFIX: ${{ steps.version.outputs.suffix }}
- run: dotnet pack ${{ env.SOLUTION }} --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
+ run: dotnet pack ${{ env.SOLUTION }} --no-restore --no-build --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
- name: Upload NuGet package
uses: actions/upload-artifact@v7
From 2cd487e537a2ac78ff48e4b78464a0b167ff8752 Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sun, 25 Oct 2026 22:05:06 +0100
Subject: [PATCH 09/11] Remove --no-build
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 11f9b6b..39aa6b1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -76,7 +76,7 @@ jobs:
shell: pwsh
env:
VERSION_SUFFIX: ${{ steps.version.outputs.suffix }}
- run: dotnet pack ${{ env.SOLUTION }} --no-restore --no-build --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
+ run: dotnet pack ${{ env.SOLUTION }} --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
- name: Upload NuGet package
uses: actions/upload-artifact@v7
From 68350c627c0ccf97161bd8fdfadf88334105435c Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Sun, 25 Oct 2026 22:15:17 +0100
Subject: [PATCH 10/11] Remove generate package on build
---
src/NLog.MailKit/NLog.MailKit.csproj | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/NLog.MailKit/NLog.MailKit.csproj b/src/NLog.MailKit/NLog.MailKit.csproj
index c2b84aa..0628765 100644
--- a/src/NLog.MailKit/NLog.MailKit.csproj
+++ b/src/NLog.MailKit/NLog.MailKit.csproj
@@ -23,7 +23,6 @@ If the mail target was already available on your platform, this package will ove
https://github.com/NLog/NLog.MailKit.git
git
nlog mail mailkit netcore smtp email
- True
True
NLog.snk
false
From e46af20b60526724010a05a4a0018c1d5e01200f Mon Sep 17 00:00:00 2001
From: Julian Verdurmen <5808377+304NotModified@users.noreply.github.com>
Date: Mon, 26 Oct 2026 22:15:40 +0100
Subject: [PATCH 11/11] move ContinuousIntegrationBuild: true
---
.github/workflows/ci.yml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 39aa6b1..55f29f3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,7 +14,6 @@ on:
env:
SOLUTION: src/NLog.MailKit.sln
- ContinuousIntegrationBuild: true
jobs:
build:
@@ -76,7 +75,7 @@ jobs:
shell: pwsh
env:
VERSION_SUFFIX: ${{ steps.version.outputs.suffix }}
- run: dotnet pack ${{ env.SOLUTION }} --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true --version-suffix "$env:VERSION_SUFFIX"
+ run: dotnet pack ${{ env.SOLUTION }} --no-restore --configuration Release --output artifacts -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:EmbedUntrackedSources=true -p:ContinuousIntegrationBuild=true --version-suffix "$env:VERSION_SUFFIX"
- name: Upload NuGet package
uses: actions/upload-artifact@v7