Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions src/IPData/IPData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
<SignAssembly>false</SignAssembly>
<DelaySign>false</DelaySign>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<VersionPrefix>3.0.1</VersionPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/IPData/IPData.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>IPData</id>
<version>3.0.0</version>
<version>$version$</version>
<authors>IPData Contributors</authors>
<owners>IPData Contributors</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down
Loading