WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 6a70dce

Browse files
authored
Merge pull request #20 from liamgold/fix/nuget-trusted-publishing-oidc
Add NuGet Trusted Publishing with OIDC
2 parents dfc7e63 + 2bf0030 commit 6a70dce

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,11 @@ jobs:
2929
- name: Pack
3030
run: dotnet pack src/XperienceCommunity.Sustainability.csproj --configuration Release --no-build --output nupkg
3131

32+
- name: NuGet login (OIDC)
33+
uses: NuGet/login@v1
34+
id: nuget_login
35+
with:
36+
user: liamgold
37+
3238
- name: Publish to NuGet using Trusted Publishing
33-
run: dotnet nuget push nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --skip-duplicate
39+
run: dotnet nuget push nupkg/*.nupkg --api-key "${{ steps.nuget_login.outputs.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)