From eb677abad2e5255fe902221537fb25e7423b2939 Mon Sep 17 00:00:00 2001 From: vivet Date: Wed, 11 Nov 2026 14:39:03 +0100 Subject: [PATCH] Changed to Trusted publishing for NuGet --- .github/workflows/build-and-deploy.yml | 13 ++++++++++--- DynamicExpression/DynamicExpression.csproj | 3 +-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 7a29f02..e7169d4 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -8,14 +8,14 @@ on: - master env: APP_NAME: DynamicExpression - VERSION: 10.0.7 + VERSION: 10.0.8 NUGET_HOST: https://api.nuget.org/v3/index.json - NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }} jobs: build-and-deploy: runs-on: ubuntu-latest permissions: contents: write + id-token: write concurrency: group: ${{ github.repository }} cancel-in-progress: true @@ -43,11 +43,18 @@ jobs: throw "Pack failed"; }; + - name: NuGet Login (Trusted Publishing) + if: github.ref == 'refs/heads/master' + id: nuget-login + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 + with: + user: vivet + - name: Push NuGet if: github.ref == 'refs/heads/master' shell: pwsh run: | - dotnet nuget push "nupkgs/*.nupkg" -s $env:NUGET_HOST -k $env:NUGET_APIKEY --skip-duplicate + dotnet nuget push "nupkgs/*.nupkg" -s $env:NUGET_HOST -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --skip-duplicate if ($LastExitCode -ne 0) { diff --git a/DynamicExpression/DynamicExpression.csproj b/DynamicExpression/DynamicExpression.csproj index b4153ce..2ff1ad8 100644 --- a/DynamicExpression/DynamicExpression.csproj +++ b/DynamicExpression/DynamicExpression.csproj @@ -15,8 +15,7 @@ Lampda, Expression, Linq, Dynamic, Criteria, Query, Paging, Pagination, Sort, Sorting README.md - - Updated NuGets - - Added NotIn expression + - Changed to Trusted publishing for NuGet https://raw.githubusercontent.com/vivet/DynamicExpression/master/LICENSE LICENSE