From 3edfcba6f185adad240ba0d5ee651a995fe9cb5a Mon Sep 17 00:00:00 2001 From: kudima03 Date: Thu, 17 Sep 2026 12:49:50 +0300 Subject: [PATCH] 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: