From aa569bcfaf4f213a550b799291efd0e151e7b3e0 Mon Sep 17 00:00:00 2001 From: azures04 Date: Tue, 27 Jan 2026 00:11:51 +0100 Subject: [PATCH] Enable nullable and implicit usings, add publish script Updated AzuresPackager.csproj to enable nullable reference types and implicit usings, set a custom package output path, corrected repository URL casing, and added repository type. Added a new PowerShell script (publish.ps1) to automate cleaning, building, restoring, packing, and publishing the NuGet package. --- AzuresPackager.csproj | 8 +++++--- publish.ps1 | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 publish.ps1 diff --git a/AzuresPackager.csproj b/AzuresPackager.csproj index 84109e2..4716585 100644 --- a/AzuresPackager.csproj +++ b/AzuresPackager.csproj @@ -1,11 +1,13 @@  net8.0 + enable + enable true - AzuresPackager - 1.0.0 + ./nupkg azures04 - https://gitea.azures.fr/Azures04/AzuresPackager + https://gitea.azures.fr/azures04/AzuresPackager + git diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..7aa90c2 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,17 @@ +clear +$version = "0.0.1" + +Write-Host "`r`n[Task 1/4] Cleaning project..." -ForegroundColor Magenta +dotnet clean + +Write-Host "`r`n[Task 2/4] Building project..." -ForegroundColor Magenta +dotnet build + +Write-Host "`r`n[Task 3/4] Restoring project..." -ForegroundColor Magenta +dotnet restore + +Write-Host "`r`n[Task 4/4] Packing project..." -ForegroundColor Magenta +dotnet pack --version $version + +Write-Host "`r`n[Task 5/4] Publishing project..." -ForegroundColor Magenta +dotnet nuget push --source AzuresGitea "nupkg\AzuresPackager.$version.nupkg" \ No newline at end of file