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:
parent
c8fabe999e
commit
aa569bcfaf
@ -1,11 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
<PackageId>AzuresPackager</PackageId>
|
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||||
<Version>1.0.0</Version>
|
|
||||||
<Authors>azures04</Authors>
|
<Authors>azures04</Authors>
|
||||||
<RepositoryUrl>https://gitea.azures.fr/Azures04/AzuresPackager</RepositoryUrl>
|
<RepositoryUrl>https://gitea.azures.fr/azures04/AzuresPackager</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
17
publish.ps1
Normal file
17
publish.ps1
Normal 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"
|
||||||
Loading…
x
Reference in New Issue
Block a user