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.
This commit is contained in:
Gilles Lazures 2026-01-27 00:11:51 +01:00
parent c8fabe999e
commit aa569bcfaf
2 changed files with 22 additions and 3 deletions

View File

@ -1,11 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>AzuresPackager</PackageId>
<Version>1.0.0</Version>
<PackageOutputPath>./nupkg</PackageOutputPath>
<Authors>azures04</Authors>
<RepositoryUrl>https://gitea.azures.fr/Azures04/AzuresPackager</RepositoryUrl>
<RepositoryUrl>https://gitea.azures.fr/azures04/AzuresPackager</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<ItemGroup>

17
publish.ps1 Normal file
View File

@ -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"