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 d90f397..6f1917c 100644
--- a/src/IPData/IPData.csproj
+++ b/src/IPData/IPData.csproj
@@ -20,8 +20,7 @@
false
false
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
- 3.0.0
- 3.0.0.0
+ 3.0.1
diff --git a/src/IPData/IPData.nuspec b/src/IPData/IPData.nuspec
index fe533ee..4c76c2d 100644
--- a/src/IPData/IPData.nuspec
+++ b/src/IPData/IPData.nuspec
@@ -2,7 +2,7 @@
IPData
- 3.0.0
+ $version$
IPData Contributors
IPData Contributors
false