Skip to content

Commit

Permalink
Fixed the type provider packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Feb 9, 2024
1 parent 7086200 commit 6c5bd19
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Pack FSharp.Data.GraphQL.Client project
run: |
cd src/FSharp.Data.GraphQL.Client
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Client project to GitHub
run: |
dotnet nuget push nuget/*Client*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Pack FSharp.Data.GraphQL.Client project
run: |
cd src/FSharp.Data.GraphQL.Client
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
dotnet pack --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Client project to NuGet
run: |
dotnet nuget push nuget/*Client*.nupkg -k ${{secrets.NUGET_SECRET}} --skip-duplicate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@
<Tailcalls>true</Tailcalls>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<BaseOutputPath>..\FSharp.Data.GraphQL.Client\bin</BaseOutputPath>
<BaseOutputPath Condition="$(IsNuGet) == ''">..\FSharp.Data.GraphQL.Client\bin</BaseOutputPath>

<Description>FSharp implementation of Facebook GraphQL query language (Client)</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" VersionOverride="$(FSharpCoreVersion)">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
<PackageReference Include="FSharp.TypeProviders.SDK" VersionOverride="8.0.2">
<PrivateAssets>all</PrivateAssets>
<ExcludeAssets>contentFiles;runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="FSharp.TypeProviders.SDK" VersionOverride="8.0.2" />
<PackageReference Include="FParsec" />
<PackageReference Include="Microsoft.Extensions.Http" />
<PackageReference Include="Microsoft.Extensions.Http">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
23 changes: 22 additions & 1 deletion src/FSharp.Data.GraphQL.Client/FSharp.Data.GraphQL.Client.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@
<PackagePath>typeproviders</PackagePath>

<Description>FSharp implementation of Facebook GraphQL query language (Client)</Description>
<NoWarn>$(NoWarn);NU5100</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" VersionOverride="$(FSharpCoreVersion)" />
<None Include="..\..\icon.png" Pack="true" PackagePath="" Visible="False" />
<None Include="..\..\README.md" Pack="true" PackagePath="" Visible="False" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" VersionOverride="$(FSharpCoreVersion)">
<PrivateAssets>all</PrivateAssets>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Http" />
</ItemGroup>

Expand All @@ -37,7 +41,24 @@
<Compile Include="GraphQLProvider.Runtime.fs" />
</ItemGroup>

<Target Name="RemoveUnnecessaryNuGetPackInput" BeforeTargets="GenerateNuspec">
<ItemGroup>
<FSharpCoreNuGetPackInput Include="@(NuGetPackInput)" Condition="$([System.String]::Copy( %(FullPath) ).EndsWith('FSharp.Core.resources.dll'))" />
<PdbNuGetPackInput Include="@(NuGetPackInput)" Condition="$([System.String]::Copy( %(FullPath) ).Contains('DesignTime')) And ('%(Extension)' == '.pdb' OR '%(Extension)' == '.xml')" />
</ItemGroup>
<ItemGroup>
<NuGetPackInput Remove="@(FSharpCoreNuGetPackInput)" />
<NuGetPackInput Remove="@(PdbNuGetPackInput)" />
<_PackageFiles Remove="@(FSharpCoreNuGetPackInput)" />
<_PackageFiles Remove="@(PdbNuGetPackInput)" />
</ItemGroup>
</Target>

<ItemGroup>
<ProjectReference Condition="$(IsNuGet) != ''" Include="..\FSharp.Data.GraphQL.Client.DesignTime\FSharp.Data.GraphQL.Client.DesignTime.fsproj">
<IsFSharpDesignTimeProvider>true</IsFSharpDesignTimeProvider>
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
<PackageReference Condition="$(IsNuGet) != ''" Include="FSharp.Data.GraphQL.Shared" VersionOverride="$(Version)" />
<ProjectReference Condition="$(IsNuGet) == ''" Include="..\FSharp.Data.GraphQL.Shared\FSharp.Data.GraphQL.Shared.fsproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="System.Collections.Immutable" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
Expand Down

0 comments on commit 6c5bd19

Please sign in to comment.