Skip to content

Commit 2a314be

Browse files
committed
Further fix for #254
I hadn't followed all of the instructions on https://learn.microsoft.com/en-gb/nuget/nuget-org/trusted-publishing
1 parent 070090f commit 2a314be

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/releaseBuild.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ jobs:
8989
needs: build_and_pack
9090
permissions:
9191
actions: read
92+
id-token: write
9293
steps:
9394
- name: Add .NET global tools location to PATH
9495
run: echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
@@ -102,7 +103,12 @@ jobs:
102103
with:
103104
name: Build results (NuGet)
104105
path: ./packages
106+
- name: Log into NuGet & get short-lived API key
107+
uses: NuGet/login@v1
108+
id: nuget-login
109+
with:
110+
user: ${{ secrets.NUGET_USER }}
105111
- name: Publish to NuGet
106-
run: dotnet nuget push ./packages/*.nupkg --source https://api.nuget.org/v3/index.json
112+
run: dotnet nuget push ./packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
107113

108114

0 commit comments

Comments
 (0)