From 3b0e0682a6c07fbb693ece1062797181c6578de3 Mon Sep 17 00:00:00 2001 From: Marcel Roozerkans Date: Fri, 22 May 2026 09:54:51 +0200 Subject: [PATCH] chore(release): walk src/*/*.csproj in publish; drop one-shot release-as override MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two small followups to the 2.0.2 publish: 1. release-please.yml's publish job was hardcoded to pack only src/ZeroAlloc.Authorization/ZeroAlloc.Authorization.csproj. When the standalone ZeroAlloc.Authorization.Generator project landed in 2.0.1, release-please continued packing only the main package — the rescue publish-from-manifest.yml workflow was needed to push the Generator package. This patch loops over src/*/*.csproj like publish-from-manifest.yml does, so future sub-package additions publish automatically. dotnet pack on IsPackable=false projects produces no .nupkg, so the loop is safe. The test step also dropped its hardcoded path (tests/ZeroAlloc.Authorization.Tests/...) and now runs the full solution's tests via plain `dotnet test`. This catches regressions in any new test project (PackSmoke, future suites) without further workflow edits. 2. release-please-config.json drops "release-as": "2.0.2". 2.0.2 has shipped; conventional-commit-driven bumps are correct from here on. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release-please.yml | 19 ++++++++++++++++--- release-please-config.json | 1 - 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 0912d48..5d442d9 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -46,10 +46,23 @@ jobs: run: dotnet build ZeroAlloc.Authorization.slnx --configuration Release -p:Version=${{ needs.release-please.outputs.version }} - name: Test - run: dotnet test tests/ZeroAlloc.Authorization.Tests/ZeroAlloc.Authorization.Tests.csproj --configuration Release --no-build --verbosity normal + run: dotnet test --configuration Release --no-build --verbosity normal - - name: Pack - run: dotnet pack src/ZeroAlloc.Authorization/ZeroAlloc.Authorization.csproj --configuration Release --no-build --output ./artifacts -p:Version=${{ needs.release-please.outputs.version }} + - name: Pack every src/* csproj + env: + VERSION: ${{ needs.release-please.outputs.version }} + # Walk src/*/*.csproj — pack every project. dotnet pack on a project + # with IsPackable=false produces no .nupkg, so internal / non-shippable + # projects are skipped automatically. Mirrors publish-from-manifest.yml + # so future sub-package additions don't silently miss publish. + run: | + mkdir -p ./artifacts + for csproj in src/*/*.csproj; do + echo "Packing $csproj at version $VERSION" + dotnet pack "$csproj" --configuration Release --no-build \ + --output ./artifacts -p:Version="$VERSION" + done + ls -la ./artifacts - name: Push to NuGet run: dotnet nuget push ./artifacts/*nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate diff --git a/release-please-config.json b/release-please-config.json index d8c37f2..fae5916 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,7 +2,6 @@ "packages": { ".": { "release-type": "simple", - "release-as": "2.0.2", "changelog-sections": [ { "type": "feat", "section": "Features" }, { "type": "fix", "section": "Bug Fixes" },