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: 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.