Skip to content

Commit 2cfd39e

Browse files
Copilotbaronfel
andcommitted
Update publish.yml to use NuGet trusted publishing
Co-authored-by: baronfel <[email protected]>
1 parent 3617180 commit 2cfd39e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Release
22

3+
permissions:
4+
id-token: write
5+
contents: write
6+
37
on:
48
push:
59
tags:
@@ -32,5 +36,10 @@ jobs:
3236
artifacts: packages/*.nupkg
3337
token: ${{ secrets.GITHUB_TOKEN }}
3438
generateReleaseNotes: true
39+
- name: NuGet login
40+
uses: NuGet/login@v1
41+
id: login
42+
with:
43+
user: ${{secrets.NUGET_USER}}
3544
- name: Push packages
36-
run: dotnet nuget push packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }}
45+
run: dotnet nuget push packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{steps.login.outputs.NUGET_API_KEY}}

0 commit comments

Comments
 (0)