diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 314340b..bbabcc3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -50,6 +50,9 @@ jobs:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
+ permissions:
+ id-token: write # required for NuGet trusted publishing (OIDC token issuance)
+
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -65,5 +68,14 @@ jobs:
name: nuget-package
path: ./artifacts
+ # Exchange the GitHub OIDC token for a short-lived nuget.org API key.
+ # Requires a Trusted Publishing policy configured on nuget.org that
+ # matches this repo owner/name and the `ci.yml` workflow file.
+ - name: NuGet login (OIDC → temp API key)
+ id: nuget-login
+ uses: NuGet/login@v1
+ with:
+ user: ${{ secrets.NUGET_USER }} # your nuget.org username (profile name), not your email
+
- name: Publish to NuGet
- run: dotnet nuget push "./artifacts/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
+ run: dotnet nuget push "./artifacts/*.nupkg" --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
diff --git a/Directory.Packages.props b/Directory.Packages.props
new file mode 100644
index 0000000..9a5001a
--- /dev/null
+++ b/Directory.Packages.props
@@ -0,0 +1,19 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demo/NextIteration.SpectreConsole.Splash.Demo/NextIteration.SpectreConsole.Splash.Demo.csproj b/demo/NextIteration.SpectreConsole.Splash.Demo/NextIteration.SpectreConsole.Splash.Demo.csproj
index e167c4c..2151a8a 100644
--- a/demo/NextIteration.SpectreConsole.Splash.Demo/NextIteration.SpectreConsole.Splash.Demo.csproj
+++ b/demo/NextIteration.SpectreConsole.Splash.Demo/NextIteration.SpectreConsole.Splash.Demo.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/src/NextIteration.SpectreConsole.Splash/NextIteration.SpectreConsole.Splash.csproj b/src/NextIteration.SpectreConsole.Splash/NextIteration.SpectreConsole.Splash.csproj
index 0031a99..0e7b005 100644
--- a/src/NextIteration.SpectreConsole.Splash/NextIteration.SpectreConsole.Splash.csproj
+++ b/src/NextIteration.SpectreConsole.Splash/NextIteration.SpectreConsole.Splash.csproj
@@ -39,10 +39,10 @@
-
-
-
-
+
+
+
+
diff --git a/tests/NextIteration.SpectreConsole.Splash.Tests/NextIteration.SpectreConsole.Splash.Tests.csproj b/tests/NextIteration.SpectreConsole.Splash.Tests/NextIteration.SpectreConsole.Splash.Tests.csproj
index 8426765..e56d1fb 100644
--- a/tests/NextIteration.SpectreConsole.Splash.Tests/NextIteration.SpectreConsole.Splash.Tests.csproj
+++ b/tests/NextIteration.SpectreConsole.Splash.Tests/NextIteration.SpectreConsole.Splash.Tests.csproj
@@ -11,10 +11,10 @@
-
-
-
-
+
+
+
+