File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,14 +19,18 @@ jobs:
1919 - name: Restore dependencies
2020 run: dotnet restore
2121
22+ - name: Get version from tag
23+ id: version
24+ run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
25+
2226 - name: Build
23- run: dotnet build --configuration Release --no-restore
27+ run: dotnet build --configuration Release --no-restore /p:Version=${{ steps.version.outputs.VERSION }}
2428
2529 - name: Test
2630 run: dotnet test --configuration Release --no-build --verbosity normal
2731
2832 - name: Pack
29- run: dotnet pack src/IPData/IPData.csproj --configuration Release --no-build --output ./nupkg
33+ run: dotnet pack src/IPData/IPData.csproj --configuration Release --no-build --output ./nupkg /p:Version=${{ steps.version.outputs.VERSION }}
3034
3135 - name: Publish to NuGet
3236 run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
Original file line number Diff line number Diff line change 2020 <SignAssembly>false</SignAssembly>
2121 <DelaySign>false</DelaySign>
2222 <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
23- <Version>3.0.0</Version>
24- <AssemblyVersion>3.0.0.0</AssemblyVersion>
23+ <VersionPrefix>3.0.1</VersionPrefix>
2524 </PropertyGroup>
2625
2726 <ItemGroup>
Original file line number Diff line number Diff line change 22<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
33 <metadata>
44 <id>IPData</id>
5- <version>3.0.0 </version>
5+ <version>$version$ </version>
66 <authors>IPData Contributors</authors>
77 <owners>IPData Contributors</owners>
88 <requireLicenseAcceptance>false</requireLicenseAcceptance>
You can’t perform that action at this time.
0 commit comments