From 69255b4fe2dfbddf7cc153b58003e1238bd5327f Mon Sep 17 00:00:00 2001 From: kudima03 Date: Thu, 17 Sep 2026 12:51:30 +0300 Subject: [PATCH 1/2] Derive assembly versions from the release tag Co-Authored-By: Claude Opus 5 --- .github/workflows/publish-nuget.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml index d63dae8..13cc748 100644 --- a/.github/workflows/publish-nuget.yml +++ b/.github/workflows/publish-nuget.yml @@ -22,7 +22,14 @@ jobs: with: dotnet-version: 10.x.x - name: Package - run: dotnet pack --configuration Release -p:Version=${{ github.ref_name }} --output . + env: + TAG: ${{ github.ref_name }} + run: | + dotnet pack --configuration Release \ + -p:Version="$TAG" \ + -p:AssemblyVersion="${TAG%%.*}.0.0.0" \ + -p:FileVersion="${TAG%%-*}" \ + --output . - name: Upload package artifact uses: actions/upload-artifact@v7 with: From f6f400ca6bb5d1597b413ab46cfa8ad0d00351b7 Mon Sep 17 00:00:00 2001 From: kudima03 Date: Thu, 17 Sep 2026 20:10:49 +0300 Subject: [PATCH 2/2] Note the CI-only version properties in CLAUDE.md Co-Authored-By: Claude Opus 5 --- CLAUDE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 9df79b1..d0514bf 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,6 +15,8 @@ dotnet format && csharpier format . # auto-fix code style dotnet pack --configuration Release -p:Version= --output . ``` +CI additionally passes `-p:AssemblyVersion` (pinned to the major) and `-p:FileVersion`; see `.github/workflows/publish-nuget.yml`. + ## Architecture This is a **single-class NuGet library** — one public type, no state, no configuration.