From 0307f1a813a6777c317aaf50841ac766fb316aac Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 12:59:22 +0000 Subject: [PATCH 1/2] Bump version to 3.0.1 for NuGet publish The v3.0.1 tag was created but the package version in csproj and nuspec was still 3.0.0, causing the NuGet push to skip as duplicate. https://claude.ai/code/session_013C9LnDefoZu8s7V61xAfGR --- src/IPData/IPData.csproj | 4 ++-- src/IPData/IPData.nuspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IPData/IPData.csproj b/src/IPData/IPData.csproj index d90f397..58dfc40 100644 --- a/src/IPData/IPData.csproj +++ b/src/IPData/IPData.csproj @@ -20,8 +20,8 @@ false false $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 3.0.0 - 3.0.0.0 + 3.0.1 + 3.0.1.0 diff --git a/src/IPData/IPData.nuspec b/src/IPData/IPData.nuspec index fe533ee..fa33689 100644 --- a/src/IPData/IPData.nuspec +++ b/src/IPData/IPData.nuspec @@ -2,7 +2,7 @@ IPData - 3.0.0 + 3.0.1 IPData Contributors IPData Contributors false From afc6ebdf2445e4339146a0bf4b26f1336d02bb78 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 13:05:30 +0000 Subject: [PATCH 2/2] Derive package version from git tag at publish time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of hardcoding the version in csproj/nuspec, the publish workflow now extracts the version from the release tag (stripping the 'v' prefix) and passes it via /p:Version to dotnet build and pack. This means future releases only require creating a tag — no file edits needed. https://claude.ai/code/session_013C9LnDefoZu8s7V61xAfGR --- .github/workflows/publish.yml | 8 ++++++-- src/IPData/IPData.csproj | 3 +-- src/IPData/IPData.nuspec | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1e87b1..d05b076 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,14 +19,18 @@ jobs: - name: Restore dependencies run: dotnet restore + - name: Get version from tag + id: version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" + - name: Build - run: dotnet build --configuration Release --no-restore + run: dotnet build --configuration Release --no-restore /p:Version=${{ steps.version.outputs.VERSION }} - name: Test run: dotnet test --configuration Release --no-build --verbosity normal - name: Pack - run: dotnet pack src/IPData/IPData.csproj --configuration Release --no-build --output ./nupkg + run: dotnet pack src/IPData/IPData.csproj --configuration Release --no-build --output ./nupkg /p:Version=${{ steps.version.outputs.VERSION }} - name: Publish to NuGet run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/src/IPData/IPData.csproj b/src/IPData/IPData.csproj index 58dfc40..6f1917c 100644 --- a/src/IPData/IPData.csproj +++ b/src/IPData/IPData.csproj @@ -20,8 +20,7 @@ false false $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - 3.0.1 - 3.0.1.0 + 3.0.1 diff --git a/src/IPData/IPData.nuspec b/src/IPData/IPData.nuspec index fa33689..4c76c2d 100644 --- a/src/IPData/IPData.nuspec +++ b/src/IPData/IPData.nuspec @@ -2,7 +2,7 @@ IPData - 3.0.1 + $version$ IPData Contributors IPData Contributors false