Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 4 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup .NET 10
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
dotnet-version: "10.0.x"

- name: Extract version from tag
id: get_version
Expand All @@ -41,46 +41,15 @@ jobs:
-p:Deterministic=true \
-p:ContinuousIntegrationBuild=true

- name: 🔍 Verify no trailing spaces in metadata
run: |
VERSION=${{ steps.get_version.outputs.version }}
unzip -p "./nupkgs/AvaLab.DispatchR.${VERSION}.nupkg" *.nuspec | \
grep -E "(projectUrl|repositoryUrl)" | \
grep -q " " && \
(echo "❌ CRITICAL: Trailing spaces detected in URLs!" && exit 1) || \
echo "✅ Metadata clean - no trailing spaces"

- name: 🔒 Check version reservation on NuGet.org (reliable method)
run: |
VERSION=${{ steps.get_version.outputs.version }}
PACKAGE_ID="AvaLab.DispatchR"

REGISTRATION_URL="https://api.nuget.org/v3/registration5-semver1/avalab.dispatchr/index.json"

echo "🔍 Checking if $PACKAGE_ID@$VERSION is reserved..."
if curl -s "$REGISTRATION_URL" | grep -q "\"$VERSION\""; then
echo "❌ FATAL: Version $VERSION is RESERVED on NuGet.org!"
echo " → Even if not visible publicly, it blocks new uploads"
echo ""
echo "✅ SOLUTION:"
echo " 1. DELETE this GitHub release: ${{ github.ref_name }}"
echo " 2. CREATE a NEW release with FRESH version (e.g., v0.2.1)"
echo " 3. NEVER reuse version numbers — they are immutable!"
exit 1
else
echo "✅ Version $VERSION appears available — proceeding"
sleep 2
fi

- name: ⚠️ PUSH PACKAGE (will FAIL on conflict - no skip-duplicate!)
- name: ⚠️ PUSH PACKAGE
run: |
VERSION=${{ steps.get_version.outputs.version }}
PKG_PATH="./nupkgs/AvaLab.DispatchR.${VERSION}.nupkg"

echo "📤 Pushing package to NuGet.org..."
echo " Path: $PKG_PATH"
echo " Source: https://api.nuget.org/v3/index.json"

dotnet nuget push "$PKG_PATH" \
--api-key ${{ secrets.NUGET_API_KEY }} \
--source https://api.nuget.org/v3/index.json \
Expand Down
95 changes: 49 additions & 46 deletions src/AvaLab.DispatchR/AvaLab.DispatchR.csproj
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Authors>AvaEngineeringLab</Authors>
<Company>AvaEngineeringLab</Company>
<Product>AvaLab.DispatchR</Product>
<Title>AvaLab.DispatchR</Title>
<PackageId>AvaLab.DispatchR</PackageId>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<PackageId>Ava.Engineering.Lab.DispatchR</PackageId>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Authors>AvaProtein</Authors>
<Company>AvaProtein</Company>
<Product>Ava.DispatchR</Product>
<Copyright>Copyright © AvaProtein $(Year)</Copyright>
<Title>Ava.DispatchR</Title>
<Description>Lightweight messaging and dispatching abstraction with DI-friendly registration. Provides a minimal, opinionated API for dispatching commands, queries, and events.</Description>
<Summary>A simple and efficient Mediator pattern implementation for message dispatching in .NET, enabling loosely coupled communication between components. It facilitates the use of commands, queries, and events in a CQRS-based architecture, with support for dependency injection (DI) and minimal configuration.</Summary>
<PackageTags>dotnet;csharp;mediator;dispatcher;command;query;cqs;cqrs;framework</PackageTags>
<PackageProjectUrl>https://github.com/AvaEngineeringLab/DispatchR</PackageProjectUrl>
<RepositoryUrl>https://github.com/AvaEngineeringLab/DispatchR</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepositoryBranch>main</RepositoryBranch>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<AssemblyTitle>Ava.DispatchR</AssemblyTitle>
<AssemblyDescription>Lightweight messaging and dispatching abstraction with DI-friendly registration. Provides a minimal, opinionated API for dispatching commands, queries, and events.</AssemblyDescription>
<AssemblyConfiguration>$(Configuration)</AssemblyConfiguration>
<AssemblyCompany>AvaProtein</AssemblyCompany>
<AssemblyProduct>Ava.DispatchR</AssemblyProduct>
<AssemblyCopyright>Copyright © AvaProtein $(Year)</AssemblyCopyright>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>

<Description>
Lightweight messaging and dispatching abstraction with DI-friendly registration.
Provides a minimal, opinionated API for dispatching commands, queries, and events.
</Description>
<Summary>
A simple and efficient Mediator pattern implementation for message dispatching in .NET, enabling loosely coupled communication between components. It facilitates the use of commands, queries, and events in a CQRS-based architecture, with support for dependency injection (DI) and minimal configuration.
</Summary>
<PackageTags>dotnet;csharp;mediator;dispatcher;command;query;cqs;cqrs;framework</PackageTags>
<PackageProjectUrl>https://github.com/AvaEngineeringLab/DispatchR</PackageProjectUrl>
<RepositoryUrl>https://github.com/AvaEngineeringLab/DispatchR</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<RepositoryBranch>main</RepositoryBranch>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>

<AssemblyTitle>AvaLab.DispatchR</AssemblyTitle>
<AssemblyDescription>
Lightweight messaging and dispatching abstraction with DI-friendly registration.
Provides a minimal, opinionated API for dispatching commands, queries, and events.
</AssemblyDescription>
<AssemblyCompany>AvaEngineeringLab</AssemblyCompany>
<AssemblyProduct>AvaLab.DispatchR</AssemblyProduct>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
<Optimize>true</Optimize>
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.2" />
Expand Down
Loading