diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml
index 353c54d8..43abb2c1 100644
--- a/.github/workflows/build-and-deploy.yml
+++ b/.github/workflows/build-and-deploy.yml
@@ -15,6 +15,7 @@ jobs:
permissions:
contents: write
packages: write
+ id-token: write
concurrency:
group: ${{ github.repository }}
cancel-in-progress: false
@@ -41,6 +42,13 @@ jobs:
throw "Tests Failed";
};
+ - name: NuGet Login (Trusted Publishing)
+ if: github.ref == 'refs/heads/master'
+ id: nuget-login
+ uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
+ with:
+ user: ${{ secrets.NUGET_USER }}
+
- name: Pack and Push (NuGet.org)
if: github.ref == 'refs/heads/master'
shell: pwsh
@@ -54,7 +62,7 @@ jobs:
dotnet nuget push "nupkgs/*.nupkg" `
--source https://api.nuget.org/v3/index.json `
- --api-key ${{ secrets.NUGET_APIKEY }} `
+ --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} `
--skip-duplicate;
if ($LastExitCode -ne 0)
diff --git a/Directory.Build.props b/Directory.Build.props
index ec56a873..e7fde10b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -25,6 +25,7 @@
This package is part of the Nano Library, a set of reusable .NET libraries for building microservice applications. Nano addresses common non-business concerns such as logging, persistence, messaging, validation, and documentation, while remaining fully configurable and extensible, so applications can stay focused on business logic. See https://github.com/Nano-Core/Nano.Library for details.
- Fixed Entity events not being declared as DIRECT exchange, ignoring the routing key
+ - Changed to Trusted publishing for NuGet
git
master