Skip to content

Commit f5b3b59

Browse files
feat(actions): add nuget trusted publishing (#10826)
1 parent 43493c4 commit f5b3b59

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ jobs:
7575
needs: sign
7676
permissions:
7777
contents: write
78+
id-token: write
7879
steps:
7980
- uses: actions/setup-dotnet@v5
8081
with:
@@ -90,9 +91,15 @@ jobs:
9091
name: bin
9192
path: drop/bin
9293

94+
- name: NuGet login
95+
uses: NuGet/login@v1
96+
id: nuget-login
97+
with:
98+
user: ${{ secrets.NUGET_USER }}
99+
93100
- name: Publish NuGet packages
94101
run: |
95-
dotnet nuget push drop/nuget/*.nupkg --api-key "${{ secrets.NUGET_KEY }}" --skip-duplicate --source https://api.nuget.org/v3/index.json
102+
dotnet nuget push drop/nuget/*.nupkg --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" --skip-duplicate --source https://api.nuget.org/v3/index.json
96103
97104
- name: Upload GitHub release
98105
run: |

0 commit comments

Comments
 (0)