Skip to content

Commit fe77bb7

Browse files
committed
Switch to nuget OIDC publishing
1 parent 97525ad commit fe77bb7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ jobs:
185185

186186
# TODO: Create a release
187187

188+
# Get a short-lived NuGet API key
189+
- name: NuGet login (OIDC)
190+
uses: NuGet/login@v1
191+
id: login
192+
with:
193+
# Recommended: use a secret like ${{ secrets.NUGET_USER }} for your nuget.org username (profile name), NOT your email address
194+
user: ${{ secrets.NUGET_USER }}
195+
188196
- name: Publish to nuget.org
189-
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.NUGET_ORG_API_KEY }} --source https://api.nuget.org/v3/index.json
197+
run: dotnet nuget push "*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
190198
working-directory: nupkgs

0 commit comments

Comments
 (0)