Skip to content

Commit a6b7c35

Browse files
committed
fix(ci): allow generated client to be packed, change packing target to solution
1 parent 3c000d4 commit a6b7c35

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/setup-dotnet@v4
3838
with:
3939
dotnet-version: |
40-
8.0.x
40+
9.0.x
4141
10.0.x
4242
4343
- name: Restore dependencies
@@ -60,7 +60,7 @@ jobs:
6060
- name: Pack library (on main push or release)
6161
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'release'
6262
run: >
63-
dotnet pack src/GoAffPro.Client/GoAffPro.Client.csproj
63+
dotnet pack GoAffPro.Client.slnx
6464
--configuration Release
6565
--no-build
6666
--output ${{ env.NuGetDirectory }}

NuGet.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
Recommended: GitHub Packages, Azure Artifacts, or BaGet self-hosted.
1515
-->
1616
<!-- <add key="streamweaver-private" value="https://nuget.pkg.github.com/{your-org}/index.json" /> -->
17+
<add key="local" value="./nupkgs" />
1718
</packageSources>
1819

1920
<packageSourceMapping>

src/GoAffPro.Client.Generated/GoAffPro.Client.Generated.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<IsPackable>true</IsPackable>
8+
9+
<PackageId>GoAffPro.Client.Generated</PackageId>
10+
<MinVerTagPrefix>v</MinVerTagPrefix>
11+
<Description>Kiota-generated .NET client for the GoAffPro API (internal dependency of GoAffPro.Client).</Description>
12+
<PackageProjectUrl>https://github.com/Agash/GoAffPro.Client</PackageProjectUrl>
13+
<RepositoryUrl>https://github.com/Agash/GoAffPro.Client</RepositoryUrl>
14+
<PackageTags>goaffpro;kiota;api;client;dotnet</PackageTags>
15+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
716
<RunKiotaOnBuild Condition="'$(RunKiotaOnBuild)' == ''">true</RunKiotaOnBuild>
817
<GoAffProOpenApiSpecPath Condition="'$(GoAffProOpenApiSpecPath)' == ''">$(MSBuildProjectDirectory)\..\..\openapi\goaffpro-canonical.yaml</GoAffProOpenApiSpecPath>
918
<GoAffProRepoRoot>$(MSBuildProjectDirectory)\..\..\</GoAffProRepoRoot>
@@ -17,6 +26,7 @@
1726
<PackageReference Include="Microsoft.Kiota.Serialization.Json" />
1827
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" />
1928
<PackageReference Include="Microsoft.Kiota.Serialization.Text" />
29+
<PackageReference Include="MinVer" PrivateAssets="all" />
2030
</ItemGroup>
2131

2232
<Target Name="GenerateKiotaClient"

0 commit comments

Comments
 (0)