Skip to content

Commit

Permalink
add version config
Browse files Browse the repository at this point in the history
  • Loading branch information
Asfiroth committed Sep 11, 2024
1 parent 88dad5e commit d52026e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish package to NuGet

on:
release:
types: [published]
push:
tags:
- 'v*'

env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
Expand All @@ -29,8 +30,12 @@ jobs:
- name: 'Build'
run: dotnet build ${{ env.PROJECT_PATH }} --configuration Release --no-restore

- name: 'Version'
id: version
uses: battila7/get-version-action@v2

- name: 'Pack'
run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --include-symbols --output ${{ env.OUTPUT_PATH }}
run: dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --no-build --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.OUTPUT_PATH }}

- name: 'Publish'
run: dotnet nuget push ${{ env.OUTPUT_PATH }}/*.nupkg -s ${{ env.NUGET_SOURCE_URL }} -k ${{ env.NUGET_API_KEY }}
9 changes: 9 additions & 0 deletions src/Dimo.Client/Dimo.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
<PropertyGroup>
<Title>DIMO SDK for .NET</Title>
<Authors>Eduardo Rodriguez</Authors>
<Company>DIMO</Company>
<PackageProjectUrl>https://dimo.org/developers</PackageProjectUrl>
<RepositoryUrl>https://github.com/DIMO-Network/dimo-dotnet-sdk</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Description>DIMO SDK for .NET</Description>
<PackageLicenseUrl>https://github.com/DIMO-Network/dimo-dotnet-sdk?tab=Apache-2.0-1-ov-file</PackageLicenseUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Http" />
Expand Down

0 comments on commit d52026e

Please sign in to comment.