Skip to content

Commit 2f87d16

Browse files
authored
Add PublishToNuGet.yml (#995)
* Add PublishToNuGet.yml * . * ;net9.0;net10.0 * all * Install UWP tools and Windows SDK * IsRunningOnGitHubActions * 452 * .
1 parent 583bf69 commit 2f87d16

16 files changed

Lines changed: 83 additions & 187 deletions

File tree

‎.github/workflows/CreateRelease.yml‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ name: CreateRelease
33
on:
44
push:
55
tags:
6-
- "v*.*.*"
6+
- "*.*.*"
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
14-
13+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1514
- name: Release
16-
uses: softprops/action-gh-release@v2
17-
with:
18-
generate_release_notes: true
15+
uses: softprops/action-gh-release@8a0cd651e5b2365bd640854a3fa5dfc70e4875f3 # v3.0.4
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
publish:
8+
name: Build, Pack, and Publish
9+
runs-on: windows-latest
10+
permissions:
11+
id-token: write # enable GitHub OIDC token issuance for this job
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
16+
17+
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
18+
with:
19+
dotnet-version: |
20+
11.0.x
21+
22+
- name: Build projects
23+
shell: pwsh
24+
run: |
25+
Get-ChildItem ./src -Recurse -Filter *.csproj |
26+
ForEach-Object {
27+
dotnet build $_.FullName -c Release
28+
}
29+
30+
- name: Pack projects
31+
shell: pwsh
32+
run: |
33+
Get-ChildItem ./src -Recurse -Filter *.csproj |
34+
ForEach-Object {
35+
dotnet pack $_.FullName -c Release --no-build -o ./packages
36+
}
37+
38+
- name: NuGet login (OIDC → temp API key)
39+
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
40+
id: login
41+
with:
42+
user: ${{ secrets.NUGET_USER }}
43+
44+
- name: Push to NuGet
45+
run: dotnet nuget push "**/packages/*.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate

‎.github/workflows/ci.yml‎

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,32 @@ jobs:
2222
UseInMemory: 'true'
2323

2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2626
with:
2727
fetch-depth: 0
2828

29-
- uses: actions/setup-dotnet@v4
29+
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
3030
with:
31-
dotnet-version: '10.0.x'
31+
dotnet-version: '11.0.x'
3232

3333
- name: Build
3434
run: |
35-
dotnet build ./src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj -c Release -p:buildType=azure-pipelines-ci
35+
dotnet build ./src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj -c Release
3636
3737
- name: Run Tests EFCore net10.0
3838
run: |
39-
dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release -p:buildType=azure-pipelines-ci
39+
dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj -c Release
40+
41+
- name: Build and pack projects
42+
shell: pwsh
43+
run: |
44+
Get-ChildItem ./src -Recurse -Filter *.csproj |
45+
ForEach-Object {
46+
dotnet build $_.FullName -c Release
47+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
48+
dotnet pack $_.FullName -c Release --no-build -o ./packages
49+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
50+
}
4051
4152
build_and_test_Linux:
4253
name: "Linux: Build and Tests"
@@ -47,13 +58,13 @@ jobs:
4758
BranchName: ${{ github.head_ref || github.ref_name }}
4859

4960
steps:
50-
- uses: actions/checkout@v4
51-
52-
- uses: actions/setup-dotnet@v4
61+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
62+
63+
- uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
5364
with:
54-
dotnet-version: '9.0.x'
65+
dotnet-version: '10.0.x'
5566

56-
- uses: actions/setup-java@v4
67+
- uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0
5768
with:
5869
distribution: 'temurin' # See 'Supported distributions' for available options
5970
java-version: '17'
@@ -81,23 +92,23 @@ jobs:
8192
8293
- name: Build
8394
run: |
84-
dotnet build ./src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj -c Debug -p:buildType=azure-pipelines-ci
85-
95+
dotnet build ./src/System.Linq.Dynamic.Core/System.Linq.Dynamic.Core.csproj -c Debug
96+
8697
- name: Run Tests EFCore .NET 10 (with Coverage)
8798
run: |
88-
dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj --configuration Debug -p:buildType=azure-pipelines-ci' -f xml -o dynamic-coverage-efcore.xml
89-
99+
dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.Tests/System.Linq.Dynamic.Core.Tests.csproj --configuration Debug' -f xml -o dynamic-coverage-efcore.xml
100+
90101
- name: Run Tests EF .NET 10 (with Coverage)
91102
run: |
92-
dotnet-coverage collect 'dotnet test ./test/EntityFramework.DynamicLinq.Tests/EntityFramework.DynamicLinq.Tests.csproj --configuration Debug --framework net10.0 -p:buildType=azure-pipelines-ci' -f xml -o dynamic-coverage-ef.xml
93-
103+
dotnet-coverage collect 'dotnet test ./test/EntityFramework.DynamicLinq.Tests/EntityFramework.DynamicLinq.Tests.csproj --configuration Debug --framework net10.0' -f xml -o dynamic-coverage-ef.xml
104+
94105
- name: Run Tests Newtonsoft.Json .NET 10 (with Coverage)
95106
run: |
96-
dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.NewtonsoftJson.Tests/System.Linq.Dynamic.Core.NewtonsoftJson.Tests.csproj --configuration Debug --framework net10.0 -p:buildType=azure-pipelines-ci' -f xml -o dynamic-coverage-newtonsoftjson.xml
97-
107+
dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.NewtonsoftJson.Tests/System.Linq.Dynamic.Core.NewtonsoftJson.Tests.csproj --configuration Debug --framework net10.0' -f xml -o dynamic-coverage-newtonsoftjson.xml
108+
98109
- name: Run Tests System.Text.Json .NET 10 (with Coverage)
99110
run: |
100-
dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.SystemTextJson.Tests/System.Linq.Dynamic.Core.SystemTextJson.Tests.csproj --configuration Debug --framework net10.0 -p:buildType=azure-pipelines-ci' -f xml -o dynamic-coverage-systemtextjson.xml
111+
dotnet-coverage collect 'dotnet test ./test/System.Linq.Dynamic.Core.SystemTextJson.Tests/System.Linq.Dynamic.Core.SystemTextJson.Tests.csproj --configuration Debug --framework net10.0' -f xml -o dynamic-coverage-systemtextjson.xml
101112
102113
- name: End analysis on SonarCloud
103114
if: ${{ steps.secret-check.outputs.run_analysis == 'true' && (github.event_name != 'workflow_dispatch' || inputs.SonarScanner) }}

‎CHANGELOG.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@
722722

723723
# 1.0.7.13 (29 November 2017)
724724
- [#117](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/117) - New features contributed by [jogibear9988](https://github.com/jogibear9988)
725-
- [#123](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/123) - appveyor contributed by [StefH](https://github.com/StefH)
725+
- [#123](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/123) - CI configuration contributed by [StefH](https://github.com/StefH)
726726
- [#114](https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/114) - Dynamic Linq Query not usable with ORM Provider [bug]
727727
- [#120](https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/120) - Error with parsing
728728
- [#122](https://github.com/zzzprojects/System.Linq.Dynamic.Core/issues/122) - Join with int list
@@ -755,7 +755,7 @@
755755
- [#85](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/85) - [Fix] Guid? == null comparison contributed by [jogibear9988](https://github.com/jogibear9988)
756756
- [#86](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/86) - [Fix] Fixed null in Parameter and added functionality Binary And and Or with different Types contributed by [jogibear9988](https://github.com/jogibear9988)
757757
- [#92](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/92) - [Feature] Adds support for decimal qualifiers. Resolves #91 contributed by [pferraris](https://github.com/pferraris)
758-
- [#93](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/93) - [Bug] Fix uap10 build in appveyor contributed by [StefH](https://github.com/StefH)
758+
- [#93](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/93) - [Bug] Fix uap10 build in CI contributed by [StefH](https://github.com/StefH)
759759
- [#99](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/99) - Added DynamicEnumerable Async extension methods contributed by [StefH](https://github.com/StefH)
760760
- [#100](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/100) - Feature: NullPropagation operator contributed by [StefH](https://github.com/StefH)
761761
- [#103](https://github.com/zzzprojects/System.Linq.Dynamic.Core/pull/103) - support group by with 2 parameters, add tolist contributed by [jogibear9988](https://github.com/jogibear9988)

‎NuGet.txt‎

Lines changed: 0 additions & 11 deletions
This file was deleted.

‎System.Linq.Dynamic.Core.sln‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 18
4-
VisualStudioVersion = 18.0.11205.157 d18.0
4+
VisualStudioVersion = 18.0.11205.157
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8463ED7E-69FB-49AE-85CF-0791AFD98E38}"
77
ProjectSection(SolutionItems) = preProject
@@ -21,7 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2121
Directory.Build.props = Directory.Build.props
2222
Generate-ReleaseNotes.bat = Generate-ReleaseNotes.bat
2323
LICENSE = LICENSE
24-
NuGet.txt = NuGet.txt
2524
PackageReadme.md = PackageReadme.md
2625
README.md = README.md
2726
version.xml = version.xml

‎src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore10/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore10.csproj‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2626
</PropertyGroup>
2727

28-
<PropertyGroup Condition=" '$(buildType)' == 'azure-pipelines-ci' ">
29-
<TargetFrameworks>net10.0</TargetFrameworks>
30-
</PropertyGroup>
31-
3228
<ItemGroup>
3329
<Compile Include="..\System.Linq.Dynamic.Core\Res.cs" />
3430
<Compile Include="..\System.Linq.Dynamic.Core\Compatibility\*.cs" />

‎src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore2/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore2.csproj‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2323
</PropertyGroup>
2424

25-
<PropertyGroup Condition=" '$(buildType)' == 'azure-pipelines-ci' ">
26-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
27-
</PropertyGroup>
28-
2925
<ItemGroup>
3026
<Compile Include="..\System.Linq.Dynamic.Core\Res.cs" />
3127
<Compile Include="..\System.Linq.Dynamic.Core\Compatibility\*.cs" />

‎src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/Microsoft.EntityFrameworkCore.DynamicLinq.AppVeyor.csproj‎

Lines changed: 0 additions & 113 deletions
This file was deleted.

‎src/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3/Microsoft.EntityFrameworkCore.DynamicLinq.EFCore3.csproj‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2626
</PropertyGroup>
2727

28-
<PropertyGroup Condition=" '$(buildType)' == 'azure-pipelines-ci' ">
29-
<TargetFrameworks>netstandard2.0</TargetFrameworks>
30-
</PropertyGroup>
31-
3228
<ItemGroup>
3329
<Compile Include="..\System.Linq.Dynamic.Core\Res.cs" />
3430
<Compile Include="..\System.Linq.Dynamic.Core\Compatibility\*.cs" />

0 commit comments

Comments
 (0)